Form Consolidation

M

Moyski

(i am boiling down my database structure to ask a simple question)
my database has these components:
tbl C15 Error Track 'where techs log found errors in manufacturing
tbl D78 Error Track 'where techs log found errors in manufacturing
tbl M14 Error Track 'where techs log found errors in manufacturing
tbl C15 Models 'my source for "model" combo list box on C15 data entry
form
tbl D78 Models 'my source for "model" combo list box on D78 data entry
form
tbl M14 Models 'my source for "model" combo list box on M14 data entry
form
tbl C15 Tests 'my source for "test" combo list box on C15 data entry
form
tbl D78 Tests 'my source for "test" combo list box on D78 data entry
form
tbl M14 Tests 'my source for "test" combo list box on M14 data entry
form


qry C15 by sernum for Update
qry D78 by sernum for Update
qry M14 by sernum for Update
qry C15 by fault/sernum/corrective action...
qry d78 by fault/sernum/corrective action...
qry M14 by fault/sernum/corrective action...


frm Front '9 buttons to open the following form.
frm C15 Data Entry
frm D78 Data Entry
frm M14 Data Entry
frm C15 Data Update
frm D78 Data Update
frm M14 Data Update
frm C15 Search
frm D78 Search
frm M14 Search


the thing is, ALL of the forms start off the same, all i do is copy,
click and change 'caption', 'models.recordsource' and
'test.recordsource' for the data entry forms and change the 'allow
edit', 'allow delete', ect. for the update and search forms. this
makes the database work for me right now. BUT, what i would like to
do is have just ONE form for the "modelfamilies per entry/update/
search" group.


how do i get the 'Front' form's buttons to change the properties of a
single form's 'caption', recordsource, ect. to access the different
table? and, if i decide to compile all the tables into ONE, (so i
can
eliminate queries) how would the 'Front' form's buttons pass a value
for 'Product Family', a new field of the combined tables use to
separate the what is now in separate tables?


thank you in advance. sorry if i am re-posting a question, but, i can
not figure what to search for to find the right VBA code for the
command button.


i also hope this is the right forum for the post.
 
T

tina

you're storing data in tablenames, which breaks normalization rules. suggest
you forget complicated forms code; you just need to structure your database
correctly, and then interacting with the data in forms will be much, much,
much easier. recommend you read up on relational design principles; you'll
have a greater investment of time up front, but it will more than pay off in
the time you save on designing the queries, forms, reports. for more
information, see http://home.att.net/~california.db/tips.html#aTip1.

hth
 
U

UpRider

Moyski, this sounds very doable.
frmFRONT can open frmMASTER passing it openargs, depending on which button
is clicked.
frmMASTER sets its own recordsource and appropriate captions based on value
of openargs it receives.

The recordsources could be the SQL of your existing queries (to eliminate
the stored queries) or the names of
the stored queries themselves (maybe best while testing).
You can add the 'product family' field to the queries (or the SQL).

HTH, UpRider
 
M

Moyski

Moyski, this sounds very doable.
frmFRONT can open frmMASTER passing it openargs, depending on which button
is clicked.
frmMASTER sets its own recordsource and appropriate captions based on value
of openargs it receives.

The recordsources could be the SQL of your existing queries (to eliminate
the stored queries) or the names of
the stored queries themselves (maybe best while testing).
You can add the 'product family' field to the queries (or the SQL).

HTH, UpRider












- Show quoted text -

Thank you UpRider, OpenArgs was what I needed.
 

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