[AccessD] Concat Again
Rocky Smolin
rockysmolin at bchacc.com
Fri Feb 2 18:28:01 CST 2018
Non numeric? Then EquipID is a text PK?
In which case it should read
Set rstEquip = dbs.OpenRecordset("SELECT * FROM tblEquipment WHERE EquipID
='" & Me.txtEquipID & "'")
Where '" is apostrophe + quote and "'" is quote + apostrophe + quote.
R
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob
Heygood
Sent: Friday, February 02, 2018 3:57 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Concat Again
Should have been clear, txtEqupID is a string value.
Thanks Jim
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Rocky Smolin
Sent: Friday, February 2, 2018 12:58 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Concat Again
I don't think you need & Me.txtEquipID &
Just
Set rstEquip = dbs.OpenRecordset("SELECT * FROM tblEquipment WHERE EquipID
=" & Me.txtEquipID)
You *might* need Val(Me.txtEquipID) But I don't think so.
If Me.txtEquipID might be null then you'd either want to trap that condition
before opening the recordset or use Nz(Me.txtEquipID,0)
HTH
Rocky Smolin
Beach Access Software
760-683-5777
www.bchacc.com
www.e-z-mrp.com
Skype: rocky.smolin
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob
Heygood
Sent: Friday, February 02, 2018 11:37 AM
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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
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