(data report) how to get the records with a user-defined tablename

01-09-2004, 09:30 PM
in my frmReport i have a combo box. the values in the combo box dynamic tables' name. if the user clicks the print button the value in the combo box must be passed to the data report for it to get the records... how can i do it?

01-09-2004, 09:57 PM
What kind of report is it? I don't completely understanding what you are saying?? Are you wanting the combobox to fill the report based on what the user selects from the combo box? You can use an sql statement to get the values from a table based on what the user has selected in the combo box. You can also use this to fill a report with all the data from a table or many tables based on what the user has selected.

sqlQuery = "Select * from tablename where fieldname ='" & combobox.text & "'"

01-10-2004, 02:27 AM
ei! thanx for your time! :D in my form there is a combo box. if the user clicks the print button, the data report must load. the value in the combo box is the table name.

SELECT * from combobox.text

in the data environment we can select the records because we pre-specified the table where we will get the records with the use of the properties.

in my case, the table name will be selected by the user. where will i code it? in the data environment or in the data report? how?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum