It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

using variables from a form in a report

Moderator: dafunkymunky

using variables from a form in a report

Postby autoit on Wed May 09, 2007 7:53 pm

OK I have a form that asks for a Vin number. Usinf the vin the database uses a table to search for that vin and when it finds that finds a model code associated with that vin. Using that model code the database opens the appropraite report. Here's where I'm lost. I need to take information from the form and insert it into textboxes and labels on the report. I have several variables dimmed as global at the top. The trick is the same variables are used no matter which report is open. So for example report_8AC is opened. I can simply typr report_8AC.txtVin, but it won't be report_8AC every time. How do I call upon an object in a report when the report itself is opened usin a variable.

using MC as the variable for MC I said docms.openreport MC which worked but I can't say report_MC.txtVin=.......

just doesnt work that way.
autoit
 
Posts: 3
Joined: Wed May 09, 2007 7:42 pm

same issue but i fixed typos

Postby autoit on Wed May 09, 2007 7:57 pm

OK I have a form that asks for a Vin number. Using the vin the database uses a table to search for that vin and when it finds that vin, it finds a model code associated with that vin. Using that model code the database opens the appropraite report. Here's where I'm lost. I need to take information from the form and insert it into textboxes and labels on the report. I have several variables dimmed as global at the top. The trick is the same variables are used no matter which report is open. So for example report_8AC is opened. I can simply type report_8AC.txtVin=...., but it won't be report_8AC every time. How do I call upon an object in a report when the report itself is opened using a variable.

using MC as the variable for ModelCcode I said docmd.openreport MC which worked but I can't say report_MC.txtVin=.......

just doesnt work that way.
autoit
 
Posts: 3
Joined: Wed May 09, 2007 7:42 pm


Who is online

Users browsing this forum: No registered users and 2 guests