Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Form data into a report to print a label

Status
Not open for further replies.

Data69

Technical User
Jan 24, 2003
24
0
0
US
I have a form in which I input my device inventory. I am trying to have a label print specific data from the form after I submit the inventory into an available status. The labels print, but the data from the form never goes into the report. The text boxes in the report are unbound.
I have used the same code when passing information into another form what am I missing to pass the data into a report? Here is my code.

'Print label message message
Dim printlabelresponse1 As Integer
printlabelresponse1 = MsgBox("Do you want to print a label for this device", vbYesNo + vbQuestion, "Update")
If printlabelresponse1 = vbYes Then
DoCmd.OpenReport "Laptoplabel", acViewPreview
Reports!Laptoplabel![serial_no] = Me!serial_no_
Reports!Laptoplabel![GoldDisk] = Me!GoldDisk
Reports!Laptoplabel![HD] = Me!HD
Reports!Laptoplabel![Model] = Me!Model
Reports!Laptoplabel![RAM] = Me!MemoryMB
Reports!Laptoplabel![available] = Me!date
Reports!Laptoplabel![tech] = (Environ("Username"))

 
I usually do it the other way around.

Set the data source on your report to the form.

I.E. = [forms].[yourform].[GoldDisk]

The form will have to be open

Tyrone Lumley
augerinn@gte.net


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top