Good morning all, you have been so helpful in the past and I'm stuck again, I don't think this should be this difficult, so it must be me!!
I have a union query that works just fine (thanks to the help received here). It joins 2 forms "cruises" and "bookings". Now my issue is from the datasheet output of this query, I am trying to open either the cruise record or the booking record. I have gotten this to work when they are each on their own datasheet by using
DoCmd.OpenForm "cruise", acNormal, , "[cruiseID]=" & Nz([CruiseID], 0)
or
DoCmd.OpenForm "booking", acNormal, , "[bookingID]=" & Nz([bookingID], 0)
What I am trying to do is be able to click on the confirmation field and open either the cruise form or the booking form. I'm sure I need an else / elseif statement but I'm stumped.
Anyone able to help me figure this one out?
thank you
I have a union query that works just fine (thanks to the help received here). It joins 2 forms "cruises" and "bookings". Now my issue is from the datasheet output of this query, I am trying to open either the cruise record or the booking record. I have gotten this to work when they are each on their own datasheet by using
DoCmd.OpenForm "cruise", acNormal, , "[cruiseID]=" & Nz([CruiseID], 0)
or
DoCmd.OpenForm "booking", acNormal, , "[bookingID]=" & Nz([bookingID], 0)
What I am trying to do is be able to click on the confirmation field and open either the cruise form or the booking form. I'm sure I need an else / elseif statement but I'm stumped.
Anyone able to help me figure this one out?
thank you