Table Edit (1 Viewer)

Bladerunner

Registered User.
Local time
Today, 12:05
Joined
Feb 11, 2013
Messages
1,799
In a DB I have several small descriptive tables that need to be 'added to or updated' frequently. (i.e. tblColor). I have added an *ADD/EDIT* (color field) to the other data in the tbl. (*) keeps it #1t on the dropdown list.

The tblColor is used in entering the color of an animal in the birthing form. A dropdown list is used to pick the appropriate color. It the user picks *ADD/EDIT*, I would like for the Color form to be opened, thus allowing the user to add or edit it. Of course immediately upon exiting the color form, all data will be refreshed. This will allow for a new color to used without leaving the original form. I have several small tables like this and would like the most practical way to do it. Is there a short way to do this or will I need to code this in?

Thanks in advance
 

bob fitz

AWF VIP
Local time
Today, 20:05
Joined
May 23, 2011
Messages
4,726
Set the Limit to List property of the combo box to YES and then use code in the Not In List event of the combo box to add an item to a combo box that is bound to data in a table. You could use the Double Click event of the combo box to remove an item from the list but I would suggest that you would only want to allow that to happen IF that item has not been used in an existing record.
 

Bladerunner

Registered User.
Local time
Today, 12:05
Joined
Feb 11, 2013
Messages
1,799
Set the Limit to List property of the combo box to YES and then use code in the Not In List event of the combo box to add an item to a combo box that is bound to data in a table.
You could use the Double Click event of the combo box to remove an item from the list but I would suggest that you would only want to allow that to happen IF that item has not been used in an existing record.


Thanks Bob: That is why I think I will stick to simply pulling up the from for the table and let the form ferret out the 'already used' items. Besides, in the beginning there will be many additions but this will get less as time goes on and the combinations of colors get used up. If I can just click the *ADD/EDIT* item which then pulls up the color form.


Thanks again.
 

bob fitz

AWF VIP
Local time
Today, 20:05
Joined
May 23, 2011
Messages
4,726
That is why I think I will stick to simply pulling up the from for the table and let the form ferret out the 'already used' items
And how will it do that.
Besides, in the beginning there will be many additions but this will get less as time goes on and the combinations of colors get used up. If I can just click the *ADD/EDIT* item which then pulls up the color form.
If you allow users to edit or delete colours then you could end up with incorrect data. eg:
Scenario 1
User Tom creates a record and records the animal's colour as Grey.
User Bob creates a record and opens the "Colour" form and changes Grey to Black. The record entered by Tom will now be Black instead of Grey.
 

Bladerunner

Registered User.
Local time
Today, 12:05
Joined
Feb 11, 2013
Messages
1,799
And how will it do that.
If you allow users to edit or delete colours then you could end up with incorrect data. eg:
Scenario 1
User Tom creates a record and records the animal's colour as Grey.
User Bob creates a record and opens the "Colour" form and changes Grey to Black. The record entered by Tom will now be Black instead of Grey.

Does not Access prevent that in form mode? It should not allow changes or deletes if that item is being used somewhere. To not be able to change or delete items in a table safely would be to let it grow to any size.

Thanks
 

bob fitz

AWF VIP
Local time
Today, 20:05
Joined
May 23, 2011
Messages
4,726
Does not Access prevent that in form mode?
Not AFAIK.
It should not allow changes or deletes if that item is being used somewhere.
I think it does, which is why I said that you would need to check with code.
To not be able to change or delete items in a table safely would be to let it grow to any size.
Not sure of your concerns here. I have tables with more than 100,000 records.
 

Bladerunner

Registered User.
Local time
Today, 12:05
Joined
Feb 11, 2013
Messages
1,799
Not AFAIK. I think it does, which is why I said that you would need to check with code.Not sure of your concerns here. I have tables with more than 100,000 records.

OK, then I will just simply allow users to add to the tblcolors and all other tables.

I thank you again for your help and advise!

Have a nice day :>)
Bladerunner
 

Users who are viewing this thread

Top Bottom