Hi Lynn
I will try to explain
Combox 1 has a list of batch numbers where job is null from a query called
batch no afterupdate the form based on table (derbatchno2) will goto
recordset of this batch number the second combobox has list of available
jobs
afterupdate of this combox the the job field in form is updated with the
job
number
the comboxes are then set to null for next selection .
So when select combox 1 the batch number originally selected should
nolonger
be available as job is nolonger is null
if close form and reopen this is case but other wise it still shows
My codes so far are as follows
Private Sub combo1_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[BatchNo] = """ & Me.combo1 & """"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo2_AfterUpdate()
If IsNull(Me.combo1) Then
MsgBox "please select batch number first"
Me.Combo2 = Null
Exit Sub
Else
Me.Job = Me.Combo2
Me.CycleCount = Me.Combo2.Column(1)
Me.ExpiryMonth = DateAdd("m", Me.CycleCount, Me.StartMonth)
Me.TimeStamp = Now
End If
Me.combo1 = Null
Me.Combo2 = Null
End Sub
Hope this explains what i am trying to do
thanks for your time
tk
Lynn Trapp said:
Well, normally you would requery the 2nd combobox in the Change event of
the
first. I can't quite visualize what you are trying to do by basing a
first
combobox on a second.
--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security:
www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html