add new record thru subform

  • Thread starter Thread starter John
  • Start date Start date
J

John

I am getting frustrated in trying to get a subform on a
tab control to add a new record. It seems no matter what
I try I get a warning message saying "You Can't Assign a
Value To This Object." That is when I try to type in the
first text box of the subform. I see the auto number jump
to the next auto number and the warning sign appears. Here
is what I have; a main form with a tab control with a
subform on it with textboxes on the subform. The
properties are set correctly. No matter what, I still get
the above warning.
I seek the wisdom and guidance of the newsgroup to assist
me on this dilemma.
*** John
 
John

How have you related the subform to the main form? That is, what are the
linking fields so that Access knows which main form record is related to the
subform record you are trying to create?

Do you have error handling routines, so you can identify WHICH object won't
accept a value?

I understand you believe you have the properties "set correctly". There are
literally hundreds (when considering the form, subform, tab control, and all
the other controls), some mention of WHICH properties you believe you have
set would help troubleshooting.
 
Jeff, on the main form I have the following;
combo box - for selecting the client name. This also
makes the mainform textboxes along with the tab1 subform
move to the selected record.
textbox - display the client name so user can see
which client it is regardless of tab
textbox - display the internal client number assigned
to the client
textbox - for the autonumber
tab control - with 5 tabs to hold the 5 different
subforms.

The main form is bound to the client table. The subform on
tab1 I wish to update is also bound to the same client
table.

On the subform on the tab control is a button for adding
new clients (I hope). I have considered a separate pop up
form for adding new clients. But, the other subforms on
each of the other tabs relies on the info in the
preceeding tab. (tab2 client locations info depends on
tab1 client, tab3 claims info depends on tab2 location,
etc). Only subform/tab1 will be bond to the same table as
the mainform.

The tab1 subform is related thru the link master/child
properties using ClientInformationID.

Let me know if you need further info. And thanks.

*** John
 
John

So you're saying that you have a main form AND a subform both bound to the
same table? That's a bit unusual!

How about if you step away from the forms and controls and all and simply
describe what you'd like to accomplish, not how?
 
What I would like to do is be able to add a new record
using the subform. It has all the fields in the table
while the mainform only has a select few.
*** John
 
What I would like to do is be able to add a new record
using the subform. It has all the fields in the table
while the mainform only has a select few.

Why a subform?

I'd suggest using a Tab Control; have the first tab displaying your
select few fields, and the second tab display all of them.
 
Back
Top