This Actually WOrked:
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)
Dim sCurrentEFolderLoadSource As String
sCurrentEFolderLoadSource = "SELECT Distinct Archive.ArchiveKey, Archive.ArchiveName, MainTitle.MainTitleKey, MainTitle.MainLevelTitle FROM " & _
"Archive INNER JOIN MainTitle ON Archive.ArchiveKey = MainTitle.ArchiveKey where Archive.ArchiveKey='" & Me.cmbCurrentECabinet.Value & "'"
Me.cmbCurrentEFolder.RowSource = sCurrentEFolderLoadSource
Me.cmbCurrentEFolder.Requery
With Warm Regards,
Sent: Thursday, September 28, 2017 7:35:51 PM
To: Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals]
Subject: Re: RE: [MS_AccessPros] Put quote marks around result
With Warm Regards,
… "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: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar