darksniper
Registered User.
- Local time
- Today, 10:29
- Joined
- Sep 4, 2005
- Messages
- 108
edit: I found out that I cannot have a form and a report accessing the table at the same time, what can I do about it if I want to preview current selected record?
I have been having trouble to create a form with a subform, which after you click a button and it would load up the data of that form and subform into the report. Is there a hint or guide, I have the form and I have the report it is just linking them together gives me a headake.
I found that under report filter I need to add "([id] = Forms![formUsers]![id])"
source is the queury that contains records of form and subform.
and under form I have added a button that previews the report. but I get "database engine could not lock table.." when I press on the button.
on_click event code
I have been having trouble to create a form with a subform, which after you click a button and it would load up the data of that form and subform into the report. Is there a hint or guide, I have the form and I have the report it is just linking them together gives me a headake.
I found that under report filter I need to add "([id] = Forms![formUsers]![id])"
source is the queury that contains records of form and subform.
and under form I have added a button that previews the report. but I get "database engine could not lock table.." when I press on the button.
on_click event code
Code:
Private Sub Command15_Click()
On Error GoTo Err_Command15_Click
Dim stDocName As String
stDocName = "rptlUserInfo"
DoCmd.OpenReport stDocName, acPreview
Exit_Command15_Click:
Exit Sub
Err_Command15_Click:
MsgBox Err.Description
Resume Exit_Command15_Click
End Sub
Last edited: