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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
openform filter
Hi all
If a user chooses an Activity of 'Toil' on my form I want a pop-up form to open displaying all available Toil Days for that user. The toil days are created by a different routine which stores ItineraryID, ToilDate and ToilTaken fields. I have a query (qry Toil Available) which joins the Toil table with the Itinerary Table to find the Specialist for the activity and only displays those records where ToilTaken is Null. If I run this query with the form open on a record it works as desired. But if I try to use this query in code to open the pop-up form it prompts the user to enter Itinerary.Specialist. I've also added the criteria as a parameter to the query in case this was the problem but it still doesn't work. Why does it ask for this parameter when the query has it as criteria and works if opened manually rather than via the code??? This is what I've tried... Thx. Sue If Me![Activity] = "Toil" Then If IsNull(Me![Specialist]) Then msg = "Please enter a Specialist before choosing the Activity Toil." MsgBox msg, vbCritical, "Specialist Required" Else DoCmd.OpenForm "frm Toil", , "qry Toil Available" End If End If |
Thread Tools | |
Display Modes | |
|
|