[AccessD] Concat Again
Jim Dettman
jimdettman at verizon.net
Fri Feb 2 13:52:59 CST 2018
Bob,
("SELECT * FROM tblEquipment WHERE EquipID = '" & Me.txtEquipID & "'")
Or
("SELECT * FROM tblEquipment WHERE EquipID =" & chr$(34) & Me.txtEquipID &
chr$(34))
And as a suggestion for troubleshooting, always do this:
strSQL = "SELECT * FROM tblEquipment WHERE EquipID =" & chr$(34) &
Me.txtEquipID & chr$(34)
Set rstEquip = dbs.OpenRecordset(strSQL)
As it allows you to set a break point and look at the SQL before execution.
Jim.
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob
Heygood
Sent: Friday, February 2, 2018 2:37 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Concat Again
Hello to the list.
Brain lock here. Just can't make this work:
Set rstEquip = dbs.OpenRecordset("SELECT * FROM tblEquipment WHERE
EquipID =" & " & Me.txtEquipID & ")
DAO A 2010
Very sure this is obvious. But not to me right now.
TIA
Bob
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list