Need to Update Field Values via Input Box

CSJM45

Registered User.
Local time
Today, 00:56
Joined
Aug 7, 2013
Messages
45
Hello,

I'm trying to update the account number via an input box with a do loop but I don't have the code right. The at the input box, the user will type in a 4-8 digit number and it will update all the account number fields in a table that are null.

Any thoughts are greatly appreciated.
 
UPDATE <YourTable> SET <YourTable>.<YourField>= [Input Account number]
WHERE (((<YourTable>.<YourField>) Is Null));

This is an update query. Substitute your Table and your Field names. A popup Parameter Dialog will appear when it runs.

To launch in vba

strSql = "UPDATE <YourTable> SET <YourTable>.<YourField>= [Input Account number] " & vbCrLf & _
"WHERE (((<YourTable>.<YourField>) Is Null));"

currentdb.execute (strSQL)

Cheers!
Goh
 

Users who are viewing this thread

Back
Top Bottom