holiday_intern
New member
- Local time
- Today, 16:40
- Joined
- Jul 21, 2005
- Messages
- 8
Open Form with specified Recordset and Autofill
hi, im a beginner in access and want to do something like that:
<edit>this is in the DetailButton_Click() event</edit>
stDocName = "PersonDetails_Form"
DoCmd.RunCommand acCmdSaveRecord
'open form with recordset of person
DoCmd.OpenForm stDocName, , , "[P_ID] = " & Forms![PersonBase_Form]![P_ID]
'now the part i dont know how to do
If Not "[P_ID] = " & Forms![PersonBase_Form]![P_ID] Then
DoCmd.OpenForm stDocName, , acNewRec .....
End If
-> if there is no recordset of the Person, create new recordset with P_ID(hidden) and PersonNumber(visible and editable) from PersonBase
hi, im a beginner in access and want to do something like that:
<edit>this is in the DetailButton_Click() event</edit>
stDocName = "PersonDetails_Form"
DoCmd.RunCommand acCmdSaveRecord
'open form with recordset of person
DoCmd.OpenForm stDocName, , , "[P_ID] = " & Forms![PersonBase_Form]![P_ID]
'now the part i dont know how to do
If Not "[P_ID] = " & Forms![PersonBase_Form]![P_ID] Then
DoCmd.OpenForm stDocName, , acNewRec .....
End If
-> if there is no recordset of the Person, create new recordset with P_ID(hidden) and PersonNumber(visible and editable) from PersonBase
Last edited: