RecordSource in VBA (Again)

T

TeeSee

Please clarify for me (again) Access 2003 SP3 XP
If I open a new form with no controls on it and create the
RecordSource in code such as
Me.Recordsource="Select * FROM tblMyTable" ...... Should I expect a
field list to appear in order to now populate my form or do I have to
assign the ControlSource in code as well?

Thank you
 
A

Allen Browne

If you assign the RecordSource at runtime, you will have to assign the
ControlSource of your controls as well.

Be careful: you can crash Access (shut down by Windows) if a field
disappears or changes data type.
 
T

TeeSee

If you assign the RecordSource at runtime, you will have to assign the
ControlSource of your controls as well.

Be careful: you can crash Access (shut down by Windows) if a field
disappears or changes data type.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.







- Show quoted text -

Thank you Allen. The warnings will be heeded and I will put the SQL
where it obviously belongs. In this case there is no need for it at
runtime and "Now I know"

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top