Auto changed the contents of a field depending on selected value

G

Guest

Good morning,
I have been given this database written in ACCES2000 to make certain
modifications.
One modification is to automatically change the contents of a field
depending on the selected value of another one. I have 2 forms, one to input
information about hand held radios(frmEquipment) and the other form to assign
those radios to users (frmUsers). frmEquipment contains a field called
EquipmentStatus with a default value of In-Stock. When I assign a radio in
frmUser, I want the status field in frmEquipment to change from In-Stock to
Active and also to update the value on the table itself as well,
tblEquipment. This is the coding I have:
Private Sub cmbEquipSerialNumber_AfterUpdate()
'Once an Equipment is Assigned to a Client,
'Equipment Status changes from IN-STOCK to ACTIVE

If cmbEquipSerialNumber Is Not Null Then
frmEquipment.EquipUsedStatus = "ACTIVE"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
End If

End Sub
This code is not working, what am I doing wrong? How can I accomplish this
task?
Thanks for the help,
 
G

George Nicholson

The phrase "Is Null" is valid in SQL, not VB. See if this works better:

If Not IsNull(cmbEquipSerialNumber) Then

HTH,
 
G

Guest

George,
thank you for your reply. I tried your option but it does not work and
also I get a Run time error 424.
Elvis V.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top