Search By Letter Picker (1 Viewer)

Eljefegeneo

Still trying to learn
Local time
Today, 02:46
Joined
Jan 10, 2011
Messages
904
I tried to modify the code found on BaldyWeb that opens a record set and includes all the records. So far I have gotten to this but nothing happens. I definitely have records where the Organization name begins with B. If I could get this to work then I could use a letter picker to change the B to any letter.
Code:
DoCmd.OpenForm "frmNewNames"
Dim rs As Object
Dim sBookmark As String

sBookmark = "B*" 'I can substitute a letter picker for the letter later
    DoCmd.OpenForm "frmNewNames"
       Set rs = Forms!frmNewNames.RecordsetClone
           rs.FindFirst "Organization = '" & sBookmark & "'"
                  Forms!frmNewNames.Bookmark = rs.Bookmark
Set rs = Nothing
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 05:46
Joined
May 21, 2018
Messages
8,463
sBookmark = "B*" 'I can substitute a letter picker for the letter later
DoCmd.OpenForm "frmNewNames"
Set rs = Forms!frmNewNames.Recordset
rs.FindFirst "Organization Like '" & sBookmark & "'"
 

Eljefegeneo

Still trying to learn
Local time
Today, 02:46
Joined
Jan 10, 2011
Messages
904
sBookmark = "B*" 'I can substitute a letter picker for the letter later
DoCmd.OpenForm "frmNewNames"
Set rs = Forms!frmNewNames.Recordset
rs.FindFirst "Organization Like '" & sBookmark & "'"
Thank you. I knew it was something simple but I was brain dead for a while.
 

Users who are viewing this thread

Top Bottom