Extra record source

  • Thread starter Thread starter Warrio
  • Start date Start date
W

Warrio

Hello!

Is it possible to put a second record source on a form? (other than the one
on the proprities of the form)

Thanks
 
Warrio said:
Hello!

Is it possible to put a second record source on a form? (other than
the one on the proprities of the form)

I'm not sure what you mean. You can *change* the recordsource
dynamically at run time. You can set up calculated controls to look up
data from other tables or queries, though that doesn't constitute a
second recordsource. You can add one or more subforms, with
recordsources of their own. And of course you can join multiple related
tables in a query that serves as the form's recordsource.

What is it you want to do?
 
Thanks for you answer!!
I knew that I could add a second record source through coding and living it
open untill the user closes the form
but what I'm wondering is : Would the data, entred in this "second record
source" (created with code) through text boxs, be saved in the data base
without any manipulation as a normal record source?

Thanks again!
 
Warrio said:
Thanks for you answer!!
I knew that I could add a second record source through coding and
living it open untill the user closes the form
but what I'm wondering is : Would the data, entred in this "second
record source" (created with code) through text boxs, be saved in the
data base without any manipulation as a normal record source?

Provided that the text boxes are bound to fields that exist in the new
recordsource -- and the recordsource is updatable -- then the answer is
yes. The form will behave just the same as if it had always been bound
to that recordsource.
 
Thanks again for your quick answer

one more question, please!
How can I attach the textbox to the recordsource (created by coding)?

my record source looks like :
rs.Open "Select Name from Table", con, 1
but how can I bound the field Name of the this recordsource to the textbox?
(the only data propriety for the textbox is ControlSource)

so? Should I use this propriety ?
 
Warrio said:
Thanks again for your quick answer

one more question, please!
How can I attach the textbox to the recordsource (created by coding)?

my record source looks like :
rs.Open "Select Name from Table", con, 1
but how can I bound the field Name of the this recordsource to the
textbox? (the only data propriety for the textbox is ControlSource)

so? Should I use this propriety ?

Hmm. You've been saying "recordsource", but it may mean that you mean
"recordset". There's a big difference between the two. Still, in
either case you bind a control by setting its ControlSource property to
the name of a field that is in the recordsource. So if you have a text
box named "Text1" and you want to bind it at run time to a field named
"Name" (not a great name for a field!), you'd execute the statement

Me!Text1.ControlSource = "Name"
 
Back
Top