Listbox select record bound or unbound? and how to limit edit of data?

D

Darryn

Hi all

I have made up a small form to update a table with two fields. I have
tried it two ways but can't get it to do what I would like either
way!!

Unbound listbox version,
I have two text boxes on the table for data entry,
KitIDnumber
KitDescription

I created an unbound listbox using the wizard so there is a scrollable
list of records so the user can see what is there as the PK is the ID
number and it is a combination of text and numbers.

The list box works as you scroll the records data in the two text
boxes changes according to the record selected. The problem how do I
stop the user from changing data that is already there? as if you
click in one of the fields you can edit the value.

I have placed a new record button on the form to add new records but
is there any way I can lock the records from being edited accidentaly
unless the user actually consciously presses a button to allow edits?

I tried a bound list box on another copy of the form but it only
updates the KitID text box and not the KitDescription list box so when
you scroll through the list box the data gets all messed up.

Which is the best way to do it, bound or unbound?

I sort of like this basic design and would like to perfect it a bit
more so I can use it for my main equipment form also

If I should be posting this in the forms.coding group please let me
know

Darryn
-- remove two eyes to reply!
 
N

Nikos Yannacopoulos

Darryn,

If you want to use the form for data entry, then you'd
better go with bound controls. This way (a) you'll get
your updates to the table, and (b) there'll be no messing
up of fields with entres from different records.
In order to protect the recrds that are already there I
would suggest you try the following settings in the form
properties (Data tab):

Allow edits > No
Allow deletions > No
Allow additions > Yes
Data entry > ?

The latter, if set to yes, will prevent users from even
seeing the already existing records, and only allow new
record addition.

Nikos Y. (nyannaco at in dot gr)
 
D

Darryn

Darryn,

If you want to use the form for data entry, then you'd
better go with bound controls.
OK I will go for bound controls
This way (a) you'll get
your updates to the table, and (b) there'll be no messing
up of fields with entres from different records.
In order to protect the recrds that are already there I
would suggest you try the following settings in the form
properties (Data tab):

Allow edits > No
Ths stops you from selecting an item in the list box which is not what
I am after
Allow deletions > No
Allow additions > Yes
Data entry > ?
The latter, if set to yes, will prevent users from even
seeing the already existing records, and only allow new
record addition.
I worked those out

With the bound list box control I am having the following problem,
When I click an existing record record it updates the KitID text field
but does not update the KitDescription text field this stays the same
as the value it showed when the form is opened. I would like the
value of this text field to also reflect the selected record

Darryn
-- remove two eyes to reply!
 

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