Non Update Form

P

PeterM

I have a form with only one textfield which is a date. Included on the form
are three listboxes. The query for each of the listboxes perform a where the
date in the query matches the date on the form. It's that way for all 3
listboxes. I have set Allow Edits, Allow Deletions and Allow Edits to no.

It all works well except when I exit the form is burps saying that the file
operation couldn't be completed because it would create a duplicate entry in
the table.

How do I set up the form so that it doesn't try to update the records it's
querying?
 
J

Jeanette Cunningham

If you have allow edits set to no, I would expect that the listboxes
wouldn't work.
Perhaps you have a form with a subform?

The listboxes would be unbound - I am assuming they are unbound.
What happens when user selects a record in the listbox?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
P

PeterM

nope. I have the listboxes set to enabled/locked. all of the listboxes are
unbound. No subform on the form. Nothing happens when a user selects a
record...they can't select a record, the listbox is locked. It's a simple
query form consolidating information from 3 tables.
 
J

John W. Vinson

nope. I have the listboxes set to enabled/locked. all of the listboxes are
unbound. No subform on the form. Nothing happens when a user selects a
record...they can't select a record, the listbox is locked. It's a simple
query form consolidating information from 3 tables.

If the Form's AllowEdits property is set to Yes then you cannot select a
record from a combo box or listbox (even if it is unbound); all controls on
the form are uneditable because the form itself is uneditable.
 
G

Gina Whipp

John,

Did you mean AllowEdits is set to No? Set to Yes, they can make changes...

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
nope. I have the listboxes set to enabled/locked. all of the listboxes
are
unbound. No subform on the form. Nothing happens when a user selects a
record...they can't select a record, the listbox is locked. It's a simple
query form consolidating information from 3 tables.

If the Form's AllowEdits property is set to Yes then you cannot select a
record from a combo box or listbox (even if it is unbound); all controls on
the form are uneditable because the form itself is uneditable.
 
J

John W. Vinson

John,

Did you mean AllowEdits is set to No? Set to Yes, they can make changes...

If you want to be able to select (for navigation purposes) a record from a
Listbox or Combo Box, then the *form itself* must be set to allow edits. To
prevent updates to the table itself, you can either base the form on a
non-editable recordset (a Snapshot recordset, say), or set all the bound
controls to Locked = Yes, Enabled = No.
 
G

Gina Whipp

John,

Yes that is true but the way I read your reply it did not include the
Locked=Yes and Enabled=No and my speed reading caused me to mis that part of
the previous post. Tip toeing out...

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

John,

Did you mean AllowEdits is set to No? Set to Yes, they can make changes...

If you want to be able to select (for navigation purposes) a record from a
Listbox or Combo Box, then the *form itself* must be set to allow edits. To
prevent updates to the table itself, you can either base the form on a
non-editable recordset (a Snapshot recordset, say), or set all the bound
controls to Locked = Yes, Enabled = No.
 

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