Report Missing Data

M

mjones

Hi All,

With your help, I’ve been able to accomplish a lot in the last few
days – a course certificate, receipt and now almost a course
confirmation form. There are just two things left to solve for the
last one and I hope someone can help.

When I preview the report from a button in the form, it doesn’t show
any of the values. Then, if I go into Report Design and back to Print
Preview the values are in the report. This is the code from the
button on the form:

Private Sub PreviewConf_Click()
On Error GoTo Err_PreviewConf_Click

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70

Dim stDocName As String

stDocName = "rConf"
DoCmd.OpenReport stDocName, acViewPreview, , [ConfNo] = " & Me!
ConfNo & '"

Exit_PreviewConf_Click:
Exit Sub

Err_PreviewConf_Click:
MsgBox Err.Description
Resume Exit_PreviewConf_Click

End Sub

I'll put the other problem on a different post.

Thanks all,

Michele
 
X

XPS350

I think the problem is in the condition clause of teh OpenReport command.

If ConfNo is a numeric field it should be:
"[ConfNo] = " & Me!ConfNo

If it is a text field:
"[ConfNo] = '" & Me!ConfNo & "'"

Peter
http://access.xps350.com/
 
M

mjones

I think the problem is in the condition clause of teh OpenReport command.

If ConfNo is a numeric field it should be:
"[ConfNo] = " & Me!ConfNo

If it is a text field:
"[ConfNo] = '" & Me!ConfNo & "'"

Peterhttp://access.xps350.com/

Thanks! That was it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top