… "where ArchiveKey = '" & me.cmbCurrentECabinet.Value & "'"
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Thursday, September 28, 2017 1:55 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Put quote marks around result
I have the following code:
Private Sub cmbCurrentECabinet_AfterUpdate()
Me.cmbCurrentEFolder.RowSource = "SELECT Archive.ArchiveKey, Archive.ArchiveName, MainTitle.MainTitleKey, MainTitle.MainLevelTitle FROM " & _
"Archive INNER JOIN MainTitle ON Archive.ArchiveKey = MainTitle.ArchiveKey where ArchiveKey=" & Me.cmbCurrentECabinet.Value
Me.cmbCurrentEFolder = Me.cmbCurrentEFolder.ItemData(0)
End Sub
When I display the select statement I get thr following
SELECT Archive.ArchiveKey, Archive.ArchiveName, MainTitle.MainTitleKey, MainTitle.MainLevelTitle FROM Archive INNER JOIN MainTitle ON Archive.ArchiveKey = MainTitle.ArchiveKey where ArchiveKey=030215114103admindbaCAB
I am pretty sure I need to put quotes areound 030215114103admindbaCAB. How woul d I do t hat?
This is the second combo of a linked set. First combo called cmbCurrentECabinet its record source is
SELECT DISTINCT Archive.ArchiveKey, Archive.[ArchiveName] FROM Archive;
The after_update code above to load te second combo cmbCurrentEFolder.
Thanks for any ideas.
Art Lorenzini
Sioux Falls, SD
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Posted by: Liz Ravenwood <Liz_Ravenwood@beaerospace.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar