Form will not display a new record

  • Thread starter Uschi via AccessMonster.com
  • Start date
U

Uschi via AccessMonster.com

I am having a problem with one of my forms:

I have 3 forms, each has an underlying table: Security (Main form), Visitors
and Vehicle Registration. The Visitor form is a subform on the Security form.
Vehicle Registration opens by a command button on the Security form.

The primary key is the Space No. on the Security table. The primary key is
the Autonumber on both the Visitor and Vehicle Registration table.

The Visitor table and Vehicle Registration table are linked to the Security
table by the space no.

The Visitors form and underlying table work properly. The Vehicle
Registration form is the problem - it will not hold a new record once it is
closed. However that new record does appear in the underlying table, but the
space number is not listed.

I would greatly appreciate help with this.
 
J

John W. Vinson

I am having a problem with one of my forms:

I have 3 forms, each has an underlying table: Security (Main form), Visitors
and Vehicle Registration. The Visitor form is a subform on the Security form.
Vehicle Registration opens by a command button on the Security form.

The primary key is the Space No. on the Security table. The primary key is
the Autonumber on both the Visitor and Vehicle Registration table.

The Visitor table and Vehicle Registration table are linked to the Security
table by the space no.

The Visitors form and underlying table work properly. The Vehicle
Registration form is the problem - it will not hold a new record once it is
closed. However that new record does appear in the underlying table, but the
space number is not listed.

If it lets you add a record, but doesn't display it later, perhaps its Data
Entry property is set to Yes: this conceals old records.

If the record is being added to the table without a space number - how are you
*entering* the space number?

John W. Vinson [MVP]
 
U

Uschi via AccessMonster.com

Thank you for prompt reply..

The Data Entry is set to NO.

I made the Vehicle Registration form I didn't include the autonumber and the
space no. The Visitors form was made the same way.

I appreciate any other places to troubleshoot.
 
J

John W. Vinson

Thank you for prompt reply..

The Data Entry is set to NO.

I made the Vehicle Registration form I didn't include the autonumber and the
space no. The Visitors form was made the same way.

I guess I don't understand. Including or not including the autonumber on other
forms doesn't appear to have any bearing on the structure of the registration
form.

What is the Recordsource property of the registration form?
What controls do you have on the form?
What are their Control Sources?

John W. Vinson [MVP]
 
U

Uschi via AccessMonster.com

The Record Source is table Vehicle Registration.

As for controls, this is a very straight forward form. It contains the 8
fields, some of which have a a UCase on the Key Press property.

I was wondering if the problem I am having with the Vehicle Registration form
is because I made it a form instead of a subform? I attached the Vehicle
Registration form to a command button on the main form due to lack of space.

What do you think?
 
J

John W. Vinson

I was wondering if the problem I am having with the Vehicle Registration form
is because I made it a form instead of a subform? I attached the Vehicle
Registration form to a command button on the main form due to lack of space.

What do you think?

I think you may have made a mistake in your code.

Care to post the code?

A Subform has a master/child link field; a form opened from a button doesn't.
They will indeed behave differently.

John W. Vinson [MVP]
 
U

Uschi via AccessMonster.com

Hi John,

I didn't get back to you sooner because I couldn't figure out where to find
the code you requested.

In the meantime, I decided to drive myself crazy trying to find out what in
the world I could have done to mess up this once functioning database for 600
homeowners. I did indeed find the problem: I needed to set up the
relationship between the Main form and the Vehicle Registration as a one to
many.

Many thanks for you help on this.
 

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