If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Trying to Preview current record on form in a report
Hi All,
I have been trying to create a button on a form that will populate a report with only the current record's info. I have tried using this code, DoCmd.OpenReport "rptJacket", acViewPreview, , "[VUCaseFile] = '" & [VUCaseFile] & "'" VUCaseFile is an automatically generated alpha-numeric field. When i click the button i get a dialog box asking for a parameter value for VUCaseFile. I type in the case file (which is in the format VU08-000) and the report opens, but there is no data. What am I doing wrong? and is there anyway that Access can use the current VUCaseFile on the form? Any help would be GREATLY appriciated!! Litedread |
#2
|
|||
|
|||
Trying to Preview current record on form in a report
|
#3
|
|||
|
|||
Trying to Preview current record on form in a report
On Aug 8, 3:01*pm, Marshall Barton wrote:
wrote: I have been trying to create a button on a form that will populate a report with only the current record's info. I have tried using this code, DoCmd.OpenReport "rptJacket", acViewPreview, , "[VUCaseFile] = '" & [VUCaseFile] & "'" VUCaseFile is an automatically generated alpha-numeric field. When i click the button i get a dialog box asking for a parameter value for VUCaseFile. I type in the case file (which is in the format VU08-000) and the report opens, but there is no data. What am I doing wrong? and is there anyway that Access can use the current VUCaseFile on the form? The VUCaseFile **field** must be in the report's record source table/query. Also make sure that the form record was saved before opening the report. *If there is no other mechanism saving the record, the use: * * * * If Me.Dirty Then Me.Dirty = False -- Marsh MVP [MS Access] Thanks Marsh!! Cant believe it was that simple. Just added the VUCaseFile field to the query and it worked like a charm. Once again, thanks!! |
Thread Tools | |
Display Modes | |
|
|