C
Chris
From my client form the user uses a button to call a popup form that has a
combo box for the selection of that client's invoices. Once selected, I
populate controls from the columns of the combo box for the user to verify.
On the popup/selection form I have a button to call a report preview for
only the invoice selected.
Here is the coding for the button:
Private Sub btnGetReport_Click()
On Error GoTo Err_btnGetReport_Click
Dim stDocName, stLinkCriteria, msg, style, response, title As String
stDocName = "rpt 100 ReservationVoucher"
stLinkCriteria = "[InvNum]=" & Me![InvNum]
title = "Missing Data!"
style = vbOKOnly
msg = "Please make a selection or close this form."
If IsNull(Me.InvNum.Value) Or Me.InvNum = 0 Then
response = MsgBox(msg, style, title)
Exit Sub
End If
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
DoCmd.RunCommand acCmdFitToWindow
Me.Visible = False
Exit_btnGetReport_Click:
Exit Sub
Err_btnGetReport_Click:
MsgBox Err.Description
Resume Exit_btnGetReport_Click
End Sub
The combo box has the following item in its after update event: InvNum =
Format(Me.Combo0.Column(0), "00 0000"). InvNum is one of the verifying
controls.
The results are "Reserved Error", no number, but left justified as if there
should be one.
What am I not seeing? Please help this amateur, never Access schooled and
lightweight.
combo box for the selection of that client's invoices. Once selected, I
populate controls from the columns of the combo box for the user to verify.
On the popup/selection form I have a button to call a report preview for
only the invoice selected.
Here is the coding for the button:
Private Sub btnGetReport_Click()
On Error GoTo Err_btnGetReport_Click
Dim stDocName, stLinkCriteria, msg, style, response, title As String
stDocName = "rpt 100 ReservationVoucher"
stLinkCriteria = "[InvNum]=" & Me![InvNum]
title = "Missing Data!"
style = vbOKOnly
msg = "Please make a selection or close this form."
If IsNull(Me.InvNum.Value) Or Me.InvNum = 0 Then
response = MsgBox(msg, style, title)
Exit Sub
End If
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
DoCmd.RunCommand acCmdFitToWindow
Me.Visible = False
Exit_btnGetReport_Click:
Exit Sub
Err_btnGetReport_Click:
MsgBox Err.Description
Resume Exit_btnGetReport_Click
End Sub
The combo box has the following item in its after update event: InvNum =
Format(Me.Combo0.Column(0), "00 0000"). InvNum is one of the verifying
controls.
The results are "Reserved Error", no number, but left justified as if there
should be one.
What am I not seeing? Please help this amateur, never Access schooled and
lightweight.