From: Sue on 18 Mar 2010 11:53 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
|
Pages: 1 Prev: Access Class Next: intermittent problem bookmarking record to subform of itself |