View Single Post
  #2  
Old March 18th, 2010, 01:03 PM posted to microsoft.public.access
Jon Lewis[_3_]
external usenet poster
 
Posts: 40
Default Subform as datasheet question

If the data that you want to display in the subform changes as you change
records in the parent form then you could set the RecordSource for the
subform in the Current Event of the main form:
Me.NameofsubFormControl.Form.RecordSource = LocalTablename or SQL Statement

or if the data is not dependent on the main form record then in the subform
Open Event:
Me.RecordSource = LocalTablename or SQL Statement

HTH

"jpm" uh@Idetestspam@mars wrote in message
...
Hello,

Access 2007 mdb file
Using DAO in VBA module of a form to query data from SQL Server and make
a
local table.
I would like to display the data on a subform presented in datasheet view.

i.e. I'm not binding any data to the parent form . . . .don't want or need
to. I do want to bind a dao recordset to the subform for display
purposes.
It isn't immediately apparent to me how to do this. Obviously this isn't
the typical parent/child relationship with bound data. Can I do this and
can some of the experts on this group provide a few pointers?


Thanks in advance,
Jim M.

Admin: Sorry, previously mis-posted to wrong forum/group.