Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GoToRecord? not sure

Status
Not open for further replies.

corner40

Technical User
Nov 20, 2002
126
CA
I have a form(f_bookinggroup) with a subform(f_bookinghead) and the subform has a subform(f_Bookingdetail).

I have an on click event that uses a dlookup:

bdID = DLookup("bookingdetailid", "bookingdetail", "bookingheadid = " & Me.BookingHeadID & " ", "kid = " & Me.lstKidSelect.Column(0) & " ")

If bdID Is Null Then
code
else
need to gotorecord(on form f_bookingdetail) where bookingdetailid = bdid
end if

if someone can fill in the else portion for me it would be greatly appreciated. I need to have the sub-subform(f_bookingdetail) display the recordset based on the dlookup value returned.

thanks
Jeremy
 
Hi everyone
I noticed an error in my code so I changed it a little...still need the same help though...thanks

If IsNull(DLookup("bookingdetailid", "bookingdetail", "[bookingheadid] = " & Me.BookingHeadID & " AND [kid] = " & Me.lstKidSelect.Column(0))) Then
run code
else
need help here
end if

Jeremy
 
I ended up using this incase anyone ever looks:
If IsNull(DLookup("bookingdetailid", "bookingdetail", "[bookingheadid] = " & Me.BookingHeadID & " AND [kid] = " & Me.lstKidSelect.Column(0))) Then
run code
else
Me.Filter=strLookup
Me.FilterOn=True
end if
End Sub
thanks
Jeremy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top