Jumat, 29 September 2017

Re: [MS_AccessPros] Put quote marks around result

 

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,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Valar Dohaeris"






On ‎Thursday‎, ‎September‎ ‎28‎, ‎2017‎ ‎10‎:‎36‎:‎31‎ ‎PM, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Art,
What does the select statement look like with the quotes?

Duane


From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Art Lorenzini dbalorenzini@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
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
 


Added the quotes and Its still does not return anything.


With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Valar Dohaeris"






On ‎Thursday‎, ‎September‎ ‎28‎, ‎2017‎ ‎05‎:‎11‎:‎29‎ ‎PM, Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

…  "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)

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