Form Entry Not Saving

J

JackieM

When I enter records into my forms, the data is not being saved / stored in
the underlying table! However, I have no problem going directly to the table
and entering data. So what have I done wrong to my form?

I don't know if it matters, but it is a linked form. I set it up to open
from a command button on my main form. I have no problem entering records in
the main form, only this linked form.

Thanks much for any help or advice!
 
J

Jeanette Cunningham

Hi Jackie,
--open the form in design view
--on the form's property sheet
--find the data tab
--look at the property called Allow Additions
--is it set to No?
--change to Yes
--try to enter data

Post back if this doesn't fix the problem

Jeanette Cunningham
 
J

JackieM

Thanks for responding, Jeanette.

Allow additions was set to yes under the form's properties.

Any other ideas??
 
L

Linq Adams via AccessMonster.com

If Allow Additions is set to No, how does he even get to a new record to
enter data?

Is the OP trying to enter new records by typing over existing records?

Is the form actually bound to the underlying table?

I know these questions sound strange, but I've run into people trying to do
both of these things!
 
J

JackieM

As I responded to Jeanette, Allow Additions is set to Yes. I did not need to
change it from No to Yes - it already was set to Yes.

I am not trying to enter new records by typing over existing records. There
are actually no existing records at this point. This is a new DB that I am
designing that I am now trying to test by entering the actual data. I ran
into this problem on the very first record!

I'm not sure what this means - "is the form bound to the underlying table"

The record source of the form is actually an internal select query that
includes the linked fields from the main form table. I'm starting to wonder
now whether I should remove the linked table in the internal query for the
form. Maybe I should just base the form on the simple table? Problem is, I
wanted to also show 3 of the fields in this linked form that are also from
the main form. I realize this is a little duplication, but my users might
like to see the info on this linked form. But if removing this is the
easiest and most obvious solution, I suppose I should do that.

Hope this makes sense. I am not a very experienced designer.
 
L

Linq Adams via AccessMonster.com

Sorry! Your post stating what Allow Additons was set to wasn't showing when I
started answering! I suspect the problem is that the underlying query is read-
only (not updatable.)

Allen Browne has an excellent article explaining why queries are read only,
with some workarounds.

http://allenbrowne.com/ser-61.html
 
J

Jeanette Cunningham

Jackie,
not quite understanding how your linked form is set up.
If you go to the database window and double click the linked form will it
open?
If it opens, can you enter data in it?
Do you have any code behind the form?
If do, please post it.
Would you like to post the sql view of the record source for the form and
the list of controls on the form.

Jeanette Cunningham
 
J

JackieM

Thank you both for trying so hard to help me. I appreciate the reference to
the article on nonupdateable queries and I will read as much about that as I
can - I guess maybe that is my problem. Not sure if this will help, but
here's the sql statement from the properties of this form.

SELECT [Database Materials].[Proposal #], [Database Materials].Branch,
[Database Materials].[Branch Power], [Database Materials].Feeders, [Database
Materials].CCTV, [Database Materials].[CT & MRI], [Database Materials].[Fire
Alarm], [Database Materials].[Fixture/Branch], [Database Materials].[Intercom
System], [Database Materials].[Lightning Protection], [Database
Materials].[Nurse Call], [Database Materials].[Public Address], [Database
Materials].[Security/Access Control], [Database Materials].Switchgear,
[Database Materials].[Tele/Data], [Database Materials].MATV, [Database
Materials].[Cable Tray], [Database Materials].[Medical Gas], [Database
Materials].ACHA, [Database Materials].Demolition, Data.[Project Name],
Data.Area
FROM [Database Materials] INNER JOIN Data ON [Database Materials].[Proposal
#] = Data.[Proposal #];
 
J

Jeanette Cunningham

Jackie,
the only thing I can see is the use of the hash sign #
In Access # has a special meaning and should not be used in names you give
to anything.
(the special meaning is that when Access sees # it thinks it is dealing with
a date, # is a date delimiter)
Try replacing [Proposal #] with [Proposal Nbr]
or better still ProposalNbr or Proposal_Nbr
If you remove the spaces from your table name, you won't have to worry about
putting [] brackets every time you use the table name.


Jeanette Cunningham

JackieM said:
Thank you both for trying so hard to help me. I appreciate the reference
to
the article on nonupdateable queries and I will read as much about that as
I
can - I guess maybe that is my problem. Not sure if this will help, but
here's the sql statement from the properties of this form.

SELECT [Database Materials].[Proposal #], [Database Materials].Branch,
[Database Materials].[Branch Power], [Database Materials].Feeders,
[Database
Materials].CCTV, [Database Materials].[CT & MRI], [Database
Materials].[Fire
Alarm], [Database Materials].[Fixture/Branch], [Database
Materials].[Intercom
System], [Database Materials].[Lightning Protection], [Database
Materials].[Nurse Call], [Database Materials].[Public Address], [Database
Materials].[Security/Access Control], [Database Materials].Switchgear,
[Database Materials].[Tele/Data], [Database Materials].MATV, [Database
Materials].[Cable Tray], [Database Materials].[Medical Gas], [Database
Materials].ACHA, [Database Materials].Demolition, Data.[Project Name],
Data.Area
FROM [Database Materials] INNER JOIN Data ON [Database
Materials].[Proposal
#] = Data.[Proposal #];

--
JackieM


Jeanette Cunningham said:
Jackie,
not quite understanding how your linked form is set up.
If you go to the database window and double click the linked form will it
open?
If it opens, can you enter data in it?
Do you have any code behind the form?
If do, please post it.
Would you like to post the sql view of the record source for the form and
the list of controls on the form.

Jeanette Cunningham
 
J

Jeanette Cunningham

Jackie,
Data is not a very suitable name for a table because the word data has so
many other meanings in database land.
Have a look at http://www.allenbrowne.com/AppIssueBadWord.html#D for a list
of words to avoid when you are giving names in a database.

Jeanette Cunningham

JackieM said:
Thank you both for trying so hard to help me. I appreciate the reference
to
the article on nonupdateable queries and I will read as much about that as
I
can - I guess maybe that is my problem. Not sure if this will help, but
here's the sql statement from the properties of this form.

SELECT [Database Materials].[Proposal #], [Database Materials].Branch,
[Database Materials].[Branch Power], [Database Materials].Feeders,
[Database
Materials].CCTV, [Database Materials].[CT & MRI], [Database
Materials].[Fire
Alarm], [Database Materials].[Fixture/Branch], [Database
Materials].[Intercom
System], [Database Materials].[Lightning Protection], [Database
Materials].[Nurse Call], [Database Materials].[Public Address], [Database
Materials].[Security/Access Control], [Database Materials].Switchgear,
[Database Materials].[Tele/Data], [Database Materials].MATV, [Database
Materials].[Cable Tray], [Database Materials].[Medical Gas], [Database
Materials].ACHA, [Database Materials].Demolition, Data.[Project Name],
Data.Area
FROM [Database Materials] INNER JOIN Data ON [Database
Materials].[Proposal
#] = Data.[Proposal #];

--
JackieM


Jeanette Cunningham said:
Jackie,
not quite understanding how your linked form is set up.
If you go to the database window and double click the linked form will it
open?
If it opens, can you enter data in it?
Do you have any code behind the form?
If do, please post it.
Would you like to post the sql view of the record source for the form and
the list of controls on the form.

Jeanette Cunningham
 
J

Jeanette Cunningham

Jackie,
it would be a good idea to check the relationships between the 2 tables
[Proposal #] and Data.
Is there a one-to-many relationship?
Is Referential Integrity enforced?
Are there any other tables related to either [Proposal #] or Data or both?

Jeanette Cunningham


JackieM said:
Thank you both for trying so hard to help me. I appreciate the reference
to
the article on nonupdateable queries and I will read as much about that as
I
can - I guess maybe that is my problem. Not sure if this will help, but
here's the sql statement from the properties of this form.

SELECT [Database Materials].[Proposal #], [Database Materials].Branch,
[Database Materials].[Branch Power], [Database Materials].Feeders,
[Database
Materials].CCTV, [Database Materials].[CT & MRI], [Database
Materials].[Fire
Alarm], [Database Materials].[Fixture/Branch], [Database
Materials].[Intercom
System], [Database Materials].[Lightning Protection], [Database
Materials].[Nurse Call], [Database Materials].[Public Address], [Database
Materials].[Security/Access Control], [Database Materials].Switchgear,
[Database Materials].[Tele/Data], [Database Materials].MATV, [Database
Materials].[Cable Tray], [Database Materials].[Medical Gas], [Database
Materials].ACHA, [Database Materials].Demolition, Data.[Project Name],
Data.Area
FROM [Database Materials] INNER JOIN Data ON [Database
Materials].[Proposal
#] = Data.[Proposal #];

--
JackieM


Jeanette Cunningham said:
Jackie,
not quite understanding how your linked form is set up.
If you go to the database window and double click the linked form will it
open?
If it opens, can you enter data in it?
Do you have any code behind the form?
If do, please post it.
Would you like to post the sql view of the record source for the form and
the list of controls on the form.

Jeanette Cunningham
 
Top