Cancelled

Change Access SQL pass through query, which is run through VB, into a loop

I have a VB code that I run from Access and looks like this

Forms("UpdateStatusForm").Controls("status6").Value = "Processing"

Forms("UpdateStatusForm").Controls("status6").BackColor = 8454143

Forms("UpdateStatusForm").Repaint

[url removed, login to view] "A1947-06A Update inventorySuppliers Cost Quantity available", acViewNormal, acEdit

Forms("UpdateStatusForm").Controls("status6").Value = "Complete"

Forms("UpdateStatusForm").Controls("status6").BackColor = 65280

Forms("UpdateStatusForm").Repaint

The query it calls looks like this

UPDATE InventorySuppliers

SET BoydQuantityAvailable = [url removed, login to view], Cost = [url removed, login to view], BoydOldCost = [url removed, login to view], BoydAvailDate = { fn NOW() }

FROM Boyd1947All INNER JOIN

InventorySuppliers ON [url removed, login to view] = [url removed, login to view]

WHERE ([url removed, login to view] = 1947) AND (NOT ([url removed, login to view] = [url removed, login to view])) OR

([url removed, login to view] = 1947) AND (NOT ([url removed, login to view] = [url removed, login to view]))

Its a SQL query, pass through.

What i want it to do is do the following

First do a select Count

Forms("UpdateStatusForm").Controls("status6").Value = "Processing"

Forms("UpdateStatusForm").Controls("status6").BackColor = 8454143

Forms("UpdateStatusForm").Repaint

[url removed, login to view] "A1947-06A Update inventorySuppliers Cost Quantity available", acViewNormal, acEdit

Forms("UpdateStatusForm").Controls("status6").Value = "Complete"

Forms("UpdateStatusForm").Controls("status6").BackColor = 65280

Forms("UpdateStatusForm").Repaint

And if > 0, then

Forms("UpdateStatusForm").Controls("status6").Value = "Processing " & Display the number the loop its on " & of " total number of loops needed i,e, sum total / 100 + 1

Forms("UpdateStatusForm").Controls("status6").BackColor = 8454143

Forms("UpdateStatusForm").Repaint

[url removed, login to view] "A1947-06A Update inventorySuppliers Cost Quantity available", acViewNormal, acEdit

And then loop, so that if its > 0, then pause for 2 seconds, and then run again.

Forms("UpdateStatusForm").Controls("status6").Value = "Complete"

Forms("UpdateStatusForm").Controls("status6").BackColor = 65280

Forms("UpdateStatusForm").Repaint

I got pretty close to it, but I couldnt get it to display anything other than 0 loops and it would skip the items. I dont think its connecting to the database, (as no where in the code does it indicate the odbc).

Skills: Microsoft Access, SQL, Visual Basic

See more: fn number, e vb, sql query, sql 2012, access sql, sql query loop, query loop, update code sql, odbc code, sql select, loop sum, access sql query, sql query access, update sql code, sql visual basic 2012, change access sql, sql query access database, access code database, access complete database, sql query sum, access 2012, sql update, update database sql, connecting access database, sum total

About the Employer:
( 7 reviews ) Boardman, United States

Project ID: #2585090

4 freelancers are bidding on average $108 for this job

sandeep25101982

Hi, VB expert here . I can help you in this. Please see PM. Thanks

$250 USD in 3 days
(16 Reviews)
5.7
NourElDeen

Dear Sir, I would like to bid on your project. Best Regards, NourElDeen

$60 USD in 10 days
(23 Reviews)
4.2
anisur91

Please see PMB skype id;;The administrator removed this messages due to contact details which breaches our Terms and Conditions.

$30 USD in 1 day
(0 Reviews)
0.0
krodevelop

Your project seems interesting. I will be happy to assist you.

$90 USD in 5 days
(0 Reviews)
0.0