Change suborm to Data Entry

C

Chrissy

Not a pro! Limited knowledge. Can someone help?

I have a subform that is Additions/Deletes/Edits all Yes and Data Entry is
no.

Viewing and editing this subform is not a problem at all. On occasion,
there is no record in the subform's record source, as linked to a client. No
surprise, but I sometimes need to add one.

Currently, I open a separate form that is identical, data entry = yes, make
control entries, requery the subform and move right along swimmingly.

This seems cumbersome and sloppy. I would really like to simply click on
the existing edit button on my subform (switches disable/lock-enable/unlock
for user control) and be able to use the subform to add the record.

Can this be done, if so, how?

Thank you,
 
D

Douglas J. Steele

The Data Entry property doesn't determine whether records can be added; it
only determines whether existing records are displayed.

Since the AllowAdditions property is set to True, you should be able to
enter your record directly on it.
 
C

Chrissy

Douglas, I really appreciate your helping me. I really must not know much
about Access!

I get what you say, that is simple enough. Boy, did I miss the boat. I
remember why now.

I get a message when I try to 'post'...that is when click a button to move
focus to a focus holding control so I can disable and lock controls.

Message:
....not successful, they would create duplicate values...

There is no record just added or existing (I check table). I assume since I
can edit this all day without issue that I have the subform set up and linked
properly.

What could cause the dupe values message?


Thanks, once again.
 
D

Douglas J. Steele

Afraid it's hard to tell what the problem is. If your focus is moving from
the subform to the main form (or vice versa), that will cause the current
record to be saved if it's dirty. If you've got default values for fields,
that'll dirty the record, and you'll be trying to save a record that you
probably shouldn't be saving.
 
C

CW

Chrissy -
I am far from an expert myself but I can recall having similar problems at
various times and these have been a couple of the causes:
(1) In the relationship between your parent table (customers, presumably?)
and the table behind the subform (orders, or whatever it is you are dealing
with?), what is the join type? It needs to be set to one (customer side) to
many (orders or whatever it is).
(2) In both tables, in Design View, check which fields are set to be Indexed
and if so, whether they are to have No Duplicates. If you are happy to allow
duplicates and it's not going to cause you other problems, change that to
Duplicates OK.

These points may not be of help in your particular situation, but I have
gained so much useful advice from this discussion group that it's time I
tried to give something back...
CW
 
C

Chrissy

Douglas...thanks. It appears the issue was set focus. Not needed. Took it
out and I am getting an added record.

Thanks so much.
 
C

Chrissy

Thanks. Never really thought about it, but has to be true, huh?

I do appreciate this group!
 

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