A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Subform as datasheet question



 
 
Thread Tools Display Modes
  #1  
Old March 17th, 2010, 03:45 PM posted to microsoft.public.access
jpm[_3_]
external usenet poster
 
Posts: 11
Default Subform as datasheet question

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.


  #2  
Old March 18th, 2010, 02: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.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.