Entry Forms

C

Crispy

Further to my making an Album and Record Database, which grabs all my data
from the tables very well, when I want to add a new record, the form will
NOT allow me to enter and data into any of the fields!

Any ides on any settings I should change for the fields?

HELP!!!!!!
 
A

Allen Browne

If your form is based on a query, open the query and see if you can add any
records there. My guess is you can't, because the query is not updatable, or
at least won't accept new records.

Try changing your interface so you have a main form and subform instead of a
query that combines all the tables into one.
 
K

Kelvin

You should really reply to your other post if you have additional questions.
Otherwise things get messy and you might not get all your questions
answered.

Check the properties for the form and see if the AllowAdditions property is
set to Yes. Is you form based on a table or a query. If it is a query, the
query must be editable in order to add new records. Check this by running
the query byitself and see if you can edit any of the data that shows up.

Kelvin
 
C

Crispy

I can change data in all existing fields on the form I use to view the
data....

I cannot eneter a new record from any of these forms or even add a new
record from the form that will allow me to edit data!

I CAN add a new record through directly adding to the table though!!!!!

I am confused...!

Thanks for any help...
 
A

Allen Browne

What error message do you get when you move into the new row and attempt to
type?

Is there anything cancelling the BeforeInsert event?

Make sure you have the RecordSelector property set to yes, so you can see
what's going on with the new row.
 
C

Crispy

When I try to enter data into a new record, I can enter track names which
are in a sub form, but in ANY of the other fields I get an error message
that says, "Index or primary key cannot contain a null value"

Any ideas?

Thabks for all your help and patience.
 
R

Rick Brandt

Crispy said:
When I try to enter data into a new record, I can enter track names which
are in a sub form, but in ANY of the other fields I get an error message
that says, "Index or primary key cannot contain a null value"

Any ideas?

Are you filling out the data in the sub-form first? You can't do that. A
parent record must be created before you can associate any child records to
it.
 
C

Crispy

No - Either way it will not accept entries into say Artis or Album fields
but will into tracks which is a sub form...

ANy ideas?
 
A

Allen Browne

So, you are using a query as the source for this form.

Redesign, so that you are using a single table for the form.
You will no longer have the error:
"Index or primary key cannot contain a null value"
 
C

Crispy

But I have artists in one table, albums in another and track listings in
another etc...

How do I get those into just one table?

Thanks

PS - All the info I have read on designing relational databses, tells me to
keep all category data in seperate category tables!
 
A

Allen Browne

Using separate tables is correct.

For an interface, you would typically have:
1. A main form bound to the Albums table.
2. A subform bound to the Tracks table.

In the subform, include a combo box bound to the ArtistID. The use can
select the artist for the track from the combo.

If the category applies to the Albums, use a combo on the main form. If it
applies to the track, use a combo in the subform.
 

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