Kamis, 28 September 2017

[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 would I do that?


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

__._,_.___

Posted by: dbalorenzini@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar