View listbox record source in datasheet?

GoinDeep

Registered User.
Local time
Today, 16:32
Joined
Oct 9, 2002
Messages
43
I have a form with several listboxes based on seperate SQL recordsources. I want the user to be able to view the SQL in datasheet view by simply double clicking th list box.

I've done this in the past when the list box record source was a query by opening the query in Datasheet view.

Ex: On Click - DoCmd.OpenQuery "Name",acViewNormal

How do I get the same results with SQL recordsources?
 
I just come up with solution to view SQL in text box(Text11)

Dim aa As String
aa = cboYear.RowSource

Text11.ControlSource = "=" & aa

It is not exactly you need but you can submit changes in textbox and assign(force) a new SQL.
If SQL contains String data type criteria this method won't work:(
 

Users who are viewing this thread

Back
Top Bottom