SetValue AfterUpdate

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a combo box on a subform that looks up available invoice numbers from
a query. (The query lists all invoice numbers from the invoice table that do
not have a value of "assigned" in the invoice status field). When I select
the next available invoice number I want to change the value in the Invoice
table's invoice status field from blank to "Assigned".

What is the best way to handle this? Do I use an Event Procedure for the
"AfterUpdate" on the combo box properties? I am not familiar with VBA coding
so I don't know how to code the Event Procedure.

Thank you!
 
You can use an UPDATE query to change data in a table

'~~~~~~~~~~~~~~~
dim strSQL as string
strSQL = "UPDATE [Tablename] " _
& " SET Status = 'Assigned' " _
& " WHERE InvoiceNumber = " _
& InvoiceNumber & ";"
debug.print strSQL
currentdb.execute strSQL
'~~~~~~~~~~~~~~~

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
if msgbox("Do you want to do this?", _
vbyesno, _
"Permanently change record?") = vbno then
..... whatever

Warm Regards,
Crystal
Microsoft Access MVP 2006

*
Have an awesome day ;)

remote programming and training
strive4peace2006 at yahoo.com

*
 
Back
Top