OfficeFrustration (
-   Using Forms (
-   -   Limit Combo Box (

Eddie B June 7th, 2010 06:33 PM

Limit Combo Box
I will do my best to make some since.
I have a form for entering data into a table named dispatchdetatils The
Combo Box named vehiclebox on the form shows vehicle license plates numbers.
When a vehicle is chosen a new record is started and the new record milesout
field on the dispatchdetails table is populated from the max of the milesin
field. Below is what I have in the After update of the combox.
What I would like to happen also is if there is a milesin field that is null
then do not start the new record but have a pop up appear stating the vehicle
is already out. Thank you in advance

Private Sub VEHICLEBOX_AfterUpdate()
If Not IsNull(Me.VEHICLEBOX) Then

Me.milesout = _
DMax("milesin", "dispatchdetails", _
"tagnumber = " & Me.VEHICLEBOX)

End If

End Sub

All times are GMT +1. The time now is 10:06 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.