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
|
|||
|
|||
Referring to a text field in SQL
Hi,
This function with SQL statement parameter works fine when the field MRN is a number field but it does not work when MRN is a text field. How do I refer to the field in the SQL statement when it is a text field? Thanks. ConcatDx("SELECT [Procedure(s)] FROM qryConcatProc WHERE MRN =" & TblPatient.MRN) |
#2
|
|||
|
|||
Referring to a text field in SQL
Steve
Text needs to be delimited. You could try something like: WHERE MRN ='" & TblPatient.MRN & "'" (single quote marks) If those don't work, you might try using double-quote marks (but this gets a bit trickier, as you need to add multiple "s). -- Regards Jeff Boyce Microsoft Office/Access MVP http://mvp.support.microsoft.com/ Microsoft IT Academy Program Mentor http://microsoftitacademy.com/ Microsoft Registered Partner https://partner.microsoft.com/ "Steve" wrote in message ... Hi, This function with SQL statement parameter works fine when the field MRN is a number field but it does not work when MRN is a text field. How do I refer to the field in the SQL statement when it is a text field? Thanks. ConcatDx("SELECT [Procedure(s)] FROM qryConcatProc WHERE MRN =" & TblPatient.MRN) |
Thread Tools | |
Display Modes | |
|
|