open a record from a sheet view form

stefanocps

Registered User.
Local time
Today, 02:42
Joined
Jan 31, 2019
Messages
175
Hello i have a form with seacrh parameter and a submask that will display the seacrh result
Generally i have few records, each one is a patient with datas
I would like that when i click on one record shown i will open the form where all the datas are displayed in details


So let's say the first forms is SEARCH
the sunmask os "SEARCHRESULTS"
and the one to be opened is "ANAGRAPHI"


thanks for helping
 
Hi. Check out the OpenForm method of the DoCmd object.
 
thanks, could you telle me more exactly what to do..i am not that good in code
thank s alot
 
Hi. The syntax is similar to the one you used to open a report. For example:
Code:
DoCmd.OpenForm "FormName"
To open the form to a specific record, you could add a WhereCondition argument. For example:
Code:
DoCmd.OpenForm "FormName", , , "FieldName=" & Me.FieldValue
Hope it helps...
 
ok the things is that i want to open the form at the record specified
if i click on the 3rd record of the list, let's say Paul, id 3

I want to open the form at paul, id 3
 
ok the things is that i want to open the form at the record specified
if i click on the 3rd record of the list, let's say Paul, id 3

I want to open the form at paul, id 3
Hi. In case you didn't see my edit above, I offered the following:
Code:
DoCmd.OpenForm "FormName", , , "ID=" & Me.ID
In a sense, it's equivalent to this:
Code:
DoCmd.OpenForm "FormName", , , "ID=3"
Hope it makes sense...
 
Hi. In case you didn't see my edit above, I offered the following:
Code:
DoCmd.OpenForm "FormName", , , "ID=" & Me.ID
In a sense, it's equivalent to this:
Code:
DoCmd.OpenForm "FormName", , , "ID=3"
Hope it makes sense...
wonderful!!
tthanks ! :)
 
You're welcome. Hope it works for you. Good luck!
 

Users who are viewing this thread

Back
Top Bottom