Dup Table, using same form

  • Thread starter Thread starter Cindy
  • Start date Start date
C

Cindy

Re-Posted
Need Additional help.


Hi everyone.

I have two tables, and one form (very simple database)

tbDefault
tblContacts
frmInfo

1st) What I need to do is use frmInfo to have a drop down
box that shows my tables with the default tblXXXXX and not
show tbXXXXX.

2nd) The tables listed when selected use the form frmInfo

3rd) In the drop down box have a "Add New Table". This
would take the table tbDefault and copy it and ask for a
name for the new table (and provide an example, i.e. use
this format, tblXXXXX and would not alow to save the table
with any different format), then add that to the drop down
box and open the new table on the form frmInfo.

Is this possible and is there an example, or can someone
offer any help with this?

I am not sure Where/How to start.

Thank you so much,

Cindy
 
It can be done, but I can't for the life of me understand why anyone would
want to do this. Why would you want many tables that are all of the
identical format???

Please explain....

Sam
 
Re-Posted
Need Additional help.


Hi everyone.

I have two tables, and one form (very simple database)

tbDefault
tblContacts
frmInfo

1st) What I need to do is use frmInfo to have a drop down
box that shows my tables with the default tblXXXXX and not
show tbXXXXX.

See... it's not just me objecting to the design! But let's work with
it anyway.

I don't understand what this means. You say "shows my tables with the
default tblXXXXX" - there IS NO SUCH TABLE. What do you want this
combo box to show? Do you perhaps need a table tblNewTables containing
all the tables which users have created?

The Combo Box must be on a Form (they don't exist standalone). Let's
call this form frmPickTable and the combo cboTables.
2nd) The tables listed when selected use the form frmInfo

A table doesn't "use" a form - a Form "uses" a Table. Do you mean that
you want to change the Recordsource of frmInfo to point to the
selected table? If so, put the following code in the combo box's
AfterUpdate event:

Private Sub cboTables_AfterUpdate()
Dim frm As Form
DoCmd.OpenForm "frmInfo", acNormal
End Sub

and in frmInfo's Open event

Private Sub Form_Open(Cancel as Integer)
On Error Goto Proc_Error
Me.Recordsource = [Forms]![frmPickTable]![cboTables]
Proc_Exit:
Exit Sub
Proc_Error:
' if cboTables isn't open or points to a nonexistant table
Cancel = True
MsgBox "Please open this form from the PickTables form", vbOKOnly
Resume Proc_Exit
End Sub

3rd) In the drop down box have a "Add New Table". This
would take the table tbDefault and copy it and ask for a
name for the new table (and provide an example, i.e. use
this format, tblXXXXX and would not alow to save the table
with any different format), then add that to the drop down
box and open the new table on the form frmInfo.

Use the combo's NotInList event is simpler - and follow my suggestions
from the previous message.
Is this possible and is there an example, or can someone
offer any help with this?

I am not sure Where/How to start.

You REALLY REALLY need to try to educate your management.

This is a *MUCH* more difficult way to accomplish this task than your
original, proper suggestion of a normalized design with queries. In
addition, it does NOT provide the benefits they are hoping for;
archiving will be more difficult, not simpler; security will be MUCH
more difficult to implement, not simpler. Sometimes the boss is not
right and I fear this is one of those times! If you wish to contact me
directly and have me talk to whoever is demanding this, despam my
EMail address - I hate to see you get stuck in a morass for no good
reason!
 
See previous posting as to why.

This must be the wrong place. I asked for help doing it
the way a client asked, and all I get is #$^%^#$%.

The first time in a Forum I asked for help, and the last
time. I have help many in Forums and have never treated
them like this. This isn't what the Forum is supposed to
be about.

Thanks, but I don't need this type of help. I need real
help from real professionals, not real hassles from
professionals.

Good Bye

Cindy
 
Thank you for your reply and understanding.
Yes, this is what I am looking for and yes, I do want to
use a list box and have a new "tblName" in the listing and
to be able to click on the name in the table to go to the
correct subform.

Thank you for your help

Cindy

PS Sam and John, thank you. You probably were on the right
track, I just didn't recognize it.
 
Back
Top