Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Assign ID to one field based on another field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SharonInGa - 16 Nov 2005 16:01 GMT
The two fields are customer and BookingNo.  IF the customer = "A" then I need
the BookingNo to be populated with any five digit character.  IF the customer
is anything else, I need the same BookingNo to = null.   Please include code
in your answer.
Ofer - 16 Nov 2005 16:27 GMT
Try this code, on the after update event of the customer field

If Me.[Customer field name] = "A" Then
   Me.[BookingNo field name] = "ABCDE"
Else
   Me.[BookingNo field name] = ""
End If

Please enter in the brackets the name of the fields in your form

Signature

I hope that helped
Good Luck

> The two fields are customer and BookingNo.  IF the customer = "A" then I need
> the BookingNo to be populated with any five digit character.  IF the customer
> is anything else, I need the same BookingNo to = null.   Please include code
> in your answer.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.