sync combo boxes as per example given

B

boggle-eyed

i followed the instructions given to me to sync combo boxes in the sample
templates of access 07, and have managed to produce one new form; as stated i
had to do, to create eleven "working" combo boxes.
the problem i now have is that this "new form" is not linked to any table. i
followed the vba code route adapting it to sync my various combo boxes. if i
use the macro route would my end form still be the created form from the
"create form wizard" of the create tab from my original table.
if not is there a procedure to create a table from a form? or a way of
indexing data on a form to link it to a specific table.
thanks for any assistance you can offer.
 
P

Philip Herlihy

That made my head spin!

Somehow, you've ended up with a form which has controls which are not linked
to any table.

If you view the Properties Dialogue for the Form, you can set the Record
Source to be an existing table, a named query or an "anonymous" query
created right then and there. Once you've done that, you can set the
"Control Source" of controls (boxes) on the form, and by doing so you will
be picking values from the same record (as returned by one record from the
form's Record Source). (I should mention that you could fully-qualify the
Control Source so that it draws its value from somewhere other than the
Form's Record Source, but that is more specialised. I should also point out
that it's more usual to go the other way - the structure of your tables and
the relationships between them are paramount, and forms are built to fit in.
However, designing a form for a particular operation can be a way of getting
insight into what tables you're going to need, but such "prototype" forms
are usually best discarded to avoid the temptation of skewing your tables to
fit a particular form!

The rule I follow is to get your tables right first, and let all other
design decisions flow from them. In your case, the next step would be to
create a form based on an appropriate query, and then change the default
text boxes into Combo boxes, and finally set up the criterion and requery
event-handler action which will relate the combo boxes. Eleven combo
boxes - sounds pretty complex!

Phil, London
 
B

boggle-eyed

thanks phil
you have been a lifesaver, initially i had designed all my tables and built
relationships for them the normal way, as i am the only person to use my
database i was happy with all my initial forms (built by form wizard", bit of
more than i could chew when i saw the "sync combo" example and thought wow
that would spruce up the one form that is complicate from my database project
but i created a monster.
will use your advise and link the new rogue forms record source back to the
original table.
thanks once 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