A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Limit Combo Box



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2010, 06:33 PM posted to microsoft.public.access.forms
Eddie B
external usenet poster
 
Posts: 6
Default 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
Ads
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2004-2017 OfficeFrustration.
The comments are property of their posters.