Your version is to be preferred (in fact necessary) when you may have users with non-US system settings. The version without Format will only work correctly if your computer is set to US date format.
The post said -----"I put pain into a text box in my report. The pain query has multiple pains seperated by commas but I only get one of the pains in my report. Got any ideas?"
Rick B
Gary,
I tried this and it worked great but when I to put it into a report but I only got one pain of the multiple pains seperate by commas in my query qryVisits. Hansv said this would be a problem but since you are familiar with multivalued check boxes I thought you might be able to help.
Rick B
Your report should show you the multiple pains separated by comma's if the data is setup as multivalue. I am not sure what the problem is you are having. Can you attach a stripped down version of your database?
In the DB you posted there are required tables missing, some forms missing, but duplicate versions of other things.
When you post a db for others to look at make it easy by:
<LI>Checking that it works
<LI>Removing superfluous items
Your code for opening the report to a specific visit has two problems:
<LI>You start a new in the middle of a line of code. If you need to start a new line, you must use the continuation character _ at the end of the line.
<LI>visit date is not available on the form to use. Your combo is just a list of patients.
Your visits table has a primary key of visitID. If you want to open a report to a specific visit, use the ID to identify the visit rather than a combination of SSN and Date. If you use a combo box, the the ID number as a hidden first column.
They don't have to know it, or see it, but Access can still use it. Typically you would have a combo box that displays SSN and Date, but has visitID as a hidden first column, and that is what your code would use.
JH,
I tried this, which is a great solution, but what I added to the code is strWhere = "[VisitID] = " & Chr(34) & Me.[ComboSSNVD] & Chr(34) & "" but when I select an SSN and Visit Date in the combo box and press the command button to execute the above I get "Enter Parameter Value" for " VisitID"
I have had this kind of problem but can't remember how to solve it.
Can you help, please.
Rick B