Quick question

  • Thread starter One confused underwriter
  • Start date
K

Klatuu

That would be in the Click Event of the Save button.
Me.Dirty = False saves the current record to the database.
The Dirty property means there is changed data in the record that has not
been saved to the database. If you set it to false, it saves the record.
The code for the New record you have should work. Check your form
properties for the Allow Additions property. It should be set to Yes to
allow new records to be added.
 
O

One confused underwriter

Allow additions is set to 'Yes'

If there was some data missing from one of the fields, could that cause
problems like this??

I'm just starting to wonder if it really is something SMALL that's causing
this database to not add new records.
 
K

Klatuu

If you were trying to add a new record that is missing required fields or was
trying to write a duplicate key and the key is identified as unique, you
would get some errors.

Is the form based on the table or on a query?
I am only stabbing in the dark here. It puzzles me that you are getting no
errors.
 
O

One confused underwriter

I am puzzled as well. The form is based on 3 different tables that are linked
together. The first table holds in basic information about a company, another
table holds questions (and their answers) about the company, and the third
table holds comments about the companies. All three parts come together on
the form. There are no errors, it takes all of the data, but it's gone as
soon as the form is closed.
I'm going to try "Me.Dirty = False" and see if that at least forces the
update for me.
 
K

Klatuu

Sounds like it may be an unupdatable recordset. Look at the two joined
tables. Does either have more than one child table for a Parent? If so, you
can't update it. There are several things that can cause a recordset to be
unupdatable.

It is not a normal situation to have child records on the same form as the
parent record. There really should be a sub form for each child table.
 
O

One confused underwriter

Even with the Me.Dirty = False, I am unable to add records to my database.

This is why you don't give someone who doesn't have much experience a
database with issues such as these =)

Thank you, everyone, for your help and suggestions.

The struggle continues for another day...
 
K

Klatuu

Here are a couple of experiments you can try to isolate where the problem lies.
First instead of the form, open the query. Try to enter data directly into
the query. If that is successful, there is something wrong at the form level.
If you can't enter records in the query, go directly into the main table and
see if you can add a record. If you can, it means the query is an
unupdatable recordset. If you can't, then the problem is really serious.

Which brings me to another question. Is this database split? Is the back
end database or if it is not split (it should be), is the database on a
server. If so/ do you have write permissions to the server?

And, is there Security on the database and do you have permission to write
data?
 
J

John Vinson

The database is on a server on the other side of the country.

yipe...

Access does NOT play nice over the Internet, if you are running Access
on your box against a database across the continent. The only way I'd
want to work in this situation is by using a terminal server
connection (WTS or, better, Citrix) so that only screen updates go
across the wire.

Other than that, just follow Dennis' and Klatuu's suggestions.

John W. Vinson[MVP]
 
O

One confused underwriter

What do you mean is the database split?

The database is on a server, and I do have permission to update the
database. I set up security on the database and I am currently the
administrator. I'm going to check out the querys and maybe entering the data
directly into the database. I'm hoping I can isolate the problem soon.
 
O

One confused underwriter

So I tried to enter data into the database directly...and it didn't take.

This database is in big trouble isn't it??
 
O

One confused underwriter

It turns out that the database is storing the information for the new records
into the main table. But for some reason, it's not updating the other two
tables that are linked to it. The keys for the main table are set to random
so the record is placed into a random section of the table. So my questoin
becomes, is there either a way to ensure that all 3 tables are updated, when
the secondary tables' keys are numbers and the main table's key is a random
'Autonumber'??
 
O

One confused underwriter

Well I finally got the database up and running. Thank you to EVERYONE who
gave me suggestions and answered my endless questions. I couldn't have done
it without your help!!

Thank you!!
 

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