RCheesley
Registered User.
- Local time
- Today, 06:55
- Joined
- Aug 12, 2008
- Messages
- 243
Morning all,
I've got a query which is running a search box on a form (which I lifted from an example posted here incidentally) but it's picking up the GP as the ID number and not the actual GP surgery. Is there any way I can get around this, perhaps by using DLookup or something?
I've got a query which is running a search box on a form (which I lifted from an example posted here incidentally) but it's picking up the GP as the ID number and not the actual GP surgery. Is there any way I can get around this, perhaps by using DLookup or something?
Code:
SELECT qrysearch.PatientDetailsNHSNo, qrysearch.PatientDetailsDoB AS [Date of Birth], [PatientDetailsSurname] & ", " & [PatientDetailsFirstName] AS [Patient Name], [PatientDetailsGP] AS [GP Surgery] FROM qrysearch WHERE (((qrysearch.PatientDetailsNHSNo) Like "*" & Forms!frmstartscreen!txtSearch2 & "*")) Or ((([PatientDetailsFirstName] & ", " & [PatientDetailsSurname]) Like "*" & Forms!frmstartscreen!txtSearch2 & "*"));