If the length were consistent then you could format a number, but to do it with what you have would require more code than is practicle... Text is good!
Jack
Remove the WHERE bit in the SQL statement. I sent you the syntax by PM earlier. Add a criteria in the criteria line of the query. If you have a PatientID of 12 the put 12 in the criteria line of the query. Run the query and you should see that patients record. If you do then run your mail merge...
It sounds like your data is not normalized. If you want the count of '1' answers and the count of '2' answers, etc. it should not take 20 queries.
tlbRespondents
RespondentID (PK and autonumber)
LastName
FirstName
tblQuestions
QuestionID (PK and autonumber)
RespondentID (FK)
Question...
Create new, blank db then use File > Get External Data > Import to import the forms, queries, etc. that you want. In the Import dialog click the Options button and select Definition Only for the tables...
hth,
Jack
Dave -
No problem! Tell me, once again, what problem are you experiencing? Is it with the Mail Merge to Word or getting the query to show the correct record?
Jack
PS. Mail Merge and I are not good friends so I may not be able to answer a question on that subject....
Hmmm. I don't see a reference to a 'second phase' in my response, but be that as it may... I do not see a demo from Wayne, but you want to use code similar to what I suggested so the query will look to the form for its criteria. Using that code you should be able to enter and PatientID and the...
In the Criteria line of your query use code like this in the PatientID column:
[Forms]![NameOfYourForm]![NameOfTextBoxWithPatientID]
Now the query will return a single record.
You SQL should read if you want to use it:
"SELECT * FROM [QryAdenCard] WHERE [PatientID] =...