ChrisCalvert
Technical User
Sorry to post what I see is a common question, but the answers I searched did not seem to come up with the answer I needed.
I have a form frmNewAgent I have a combo box that is unbound.
cboBusSysName. I need to pass this into a report. I am using this to set up new employees. The 'reports' are set up as replicas of paper forms that are requred to fax to different departments to get accesses set up, and this combo box is just who is 'signing off' on those forms. This does not need to be a permanent part of the employees record, but does need to print. I have set a text box on the report with the 'Control' property set to "=[Forms]![frmNewAgent]![cboBusSysName]". I am using some code to open the report :
Dim stDocName As String
stDocName = "rptDataAccess"
strWhere = "[EmpNo]=" & Me![EmpNo]
If [EmpNo] <> "" Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
Else
a = MsgBox("The form must contain valid data to print it.", vbOKOnly, "Not enough data!"
End If
From what I read, the information on the 'Control' property should work, maybe it is the code?
SUggestions/Solutions appreciated
-chris
I have a form frmNewAgent I have a combo box that is unbound.
cboBusSysName. I need to pass this into a report. I am using this to set up new employees. The 'reports' are set up as replicas of paper forms that are requred to fax to different departments to get accesses set up, and this combo box is just who is 'signing off' on those forms. This does not need to be a permanent part of the employees record, but does need to print. I have set a text box on the report with the 'Control' property set to "=[Forms]![frmNewAgent]![cboBusSysName]". I am using some code to open the report :
Dim stDocName As String
stDocName = "rptDataAccess"
strWhere = "[EmpNo]=" & Me![EmpNo]
If [EmpNo] <> "" Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport strDocName, acViewPreview, , strWhere
Else
a = MsgBox("The form must contain valid data to print it.", vbOKOnly, "Not enough data!"
End If
From what I read, the information on the 'Control' property should work, maybe it is the code?
SUggestions/Solutions appreciated
-chris