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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Data on screen/Print

Status
Not open for further replies.

shyamsundar

Programmer
Aug 23, 2002
75
IN
Hi,

I have a form which lists the fields for selected table. Then the user select the field(s), thru a check box to extract the data shown in the other form. The number of fields and name of the fields varies.

Please suggest how to show/print the data for the selected fields each time.

Shyam
cwizshyam@yahoo.com
 
Sorry, I think I am not clear.

I am able to create the query and I can show the query thru openquery.

But I want to show it on the form/report on clicking the command button. I tried with flex grid, but I don't want to use Activex Control, because it is creating problems in clients machine. Pl. help.



Shyam
cwizshyam@yahoo.com
 
You could use this query as a form (or a sub form on a main form) by setting the default view on that form to datasheet.

Herman
 
Herman,

Thanx for the reply. But u have to mention the fields in the form, the fields selection varies. If there is any other way..please suggest.

Thanx once again.

Shyam
cwizshyam@yahoo.com
 
You could use the OpenArgs and a Select Case on the forms OnOpen event there you could change the me.recordsource = "Select * From etc. i.e.

Select case OpenArgs
Case "YrArg1"
me.recordsource="Select * from Yrtbl Where bla.bla."
Case "YrArg2"
me.recordsource="Select * from YrTbl2 where bla.bla."

end select
Could be the trick
Herman

 
Dear Mr. Herman

Thanx, I think still I am not clear, the query is created dynamically and saved as a querydef. I can use this query as a recordsource.

But if you are creating a form or report you have mention the field name..where in the above query field names are not same everytime...

for example..if user selected only field few fields, then the form will prompt for the fields which are form and not in query...am I clear.

Sorry....Any ideas




Shyam
cwizshyam@yahoo.com
 
Dear Mr. Herman

Thanx, I think still I am not clear, the query is created dynamically and saved as a querydef. I can use this query as a recordsource.

But if you are creating a form or report you have mention the field name..where in the above query field names are not same everytime...

for example..if user selected only field few fields, then the form will prompt for the fields which are form and not in query...am I clear.

Sorry....Any ideas




Shyam
cwizshyam@yahoo.com
 
Whey dont you just show the result of the query to the user?
Just an idear
Herman
 
No, coz, I have to give option/Command Buttons to export to other data types like text format, excel and so on.

Thanx...any advice



Shyam
cwizshyam@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top