Prevent change but allow additions

G

Guest

In a multiuser form subform setup. Main form records room info and subform
records numerous audits for each room. I need to prevent exisiting room
records from being changed while allowing new rooms to be added and allow
audits on the subform for exisiting rooms to be added. It is difficult to
test all scenarios. Can someone tell me:

If I use: Me.contol.Locked = Not Me.Newrecord in the oncurrent event of the
main form, will this also affect the subform or should I add it to the
subform also? Or do I need a different solution? Thank You.
 
G

Guest

Thanks Steve:

That seems to work, but when a duplicate number happens to be entered the
form has to be closed and opened again. I have set up a combo bod look up
which pulls up associated record, if a duplicate number is entered, is there
a way to get the associated record to come up without having to close the
form?

Thanks again.
 
S

Steve Schapel

Jeff,

I think you will need to give a bit more detailed explanation before I
can understand what you mean by "duplicate number" and "associated
record". And what is the effect of closing the form?
 
G

Guest

The main form has room info, combo box allows users to pull up records for a
room already entered and the enter additional audits on the sub form. Or the
users enter a new room number in the proper field on the main form and then
begin adding new audits.

the problem is that entering a room number suddenly makes exisiting audits
come up in the subform, thus changing the primary record the audit was
associated with.
 
S

Steve Schapel

Jeff,

You mean you enter a new Room record on the main form, and then the
Audits subform shows Audit records that were originally associated with
another Room? There is something wrong with the set up of the forms
here. What are the settings of the Link Master Fields and Link Child
Fields properties of the subform?

Does the first part of you r description work correctly? I.e. you
select the Room you want to see in the unbound combobox, and the main
form then shows the record for that selected Room, and the subform
correctly shows the existing Audits records for that Room?
 

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