[AccessD] Concat Again

Bob Heygood accesspro at gmail.com
Sat Feb 3 00:31:05 CST 2018


Yes EquipID is a key w no dupes text.

Since I can't seem to enlarge the text in the VBA editor this
quote/apostrophe jive is maddening for my old eyes.
I think I once adopted the chr(34) method. Probably should stick to it.

Thanks again to you and Jim for the responses.

Bob



-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Rocky Smolin
Sent: Friday, February 2, 2018 4:28 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Concat Again

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

--
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