Search By Letter Picker (1 Viewer)

Eljefegeneo

Still trying to learn
Local time
Yesterday, 16:51
Joined
Jan 10, 2011
Messages
859
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
Yesterday, 19:51
Joined
May 21, 2018
Messages
4,152
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
Yesterday, 16:51
Joined
Jan 10, 2011
Messages
859
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