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

How to display the results of a CrossTab query in a form?

Status
Not open for further replies.

Apollo6

Technical User
Jan 27, 2000
418
US
I have my crosstab working perfect. It contains drugs for row headings, visit dates for column headings, and comments about the drug on the date in the grid.

I want to display that on an exist form. The problem I am running into is no matter what object I try to use, subform, listbox, combo, etc, they all want to pull in the visit dates from the crosstab query as field names. The visit date is a dynamic value, meaning it can and will change on each patient pulled up. I even thought about just displaying a report on click event but the report wants to do the same thing.

Is there a way to embed the crosstab query itself into the form? Any suggestions how to get around this?
 
A side question(s) about this...

Is there anyway to add a query(results) to a form as an object?

Also, is there anyway to push crosstab results into an array and echo it out into a form or some other object that can be put onto a form?

Just curious...
 
You may consider a ListBox with ColumnHeads=True.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya Apollo6 . . .

Have you tried a subform with [blue]RowSource set to the CrossTab query name?[/blue]

Calvin.gif
See Ya! . . . . . .
 
A star for both of you!!! I had the right idea but was using the wizard to add either a subform or ListBox. The wizard wants to hardcode the columns(Visit Dates).

Thanks for the help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top