Go to record split form

ECEK

Registered User.
Local time
Today, 07:18
Joined
Dec 19, 2012
Messages
717
What Im trying to do is open a split form and go to a specific record.
I have used the macro wizard to achieve this however.

Whilst the record shows in my split form. It is filtered and I want to see all records and just go to the specific record. ie. Not filtered

As an aside.
when I convert my macro into VBA : The new code fails !!
Code:
Docmd.OpenForm "my_form", acNormal, "", "[ID]=" [&IDText], , acNormal

Can anybody shed any light on this also?
 
a shot in the dark, but try this:


Code:
 DoCmd.OpenForm "my_form", acNormal, , "ID=" & IDText.Value
 
you can use the recordset of the form to find the correct id:

Dim rs As Dao.recordset
Docmd.OpenForm "my_form", acNormal
set rs = Forms!my_form.Form.Recordsetclone
with rs
.findfirst "[id] = " & [IDText]
if not .nomatch then Forms!my_form.Form.Bookmark = .Bookmark
.close
end with
set rs=nothing
 

Users who are viewing this thread

Back
Top Bottom