Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using two lists for a field during entry

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I have a field that is restricted to a list(Table::Store, Field::Store_No) & I have another List(Table::Not_Store, Field::Not_Store_No).

Is it possible that when there is a entry(FORM VIEW) that is not in the Store/Store_No list then have it check if that entry is in the Not_Store/Not_Store_No list.

If in Store then proceed onto next field,
If in Not_Store then message: "Please Destroy",
If not in Store AND Not_Store then just don't let the user enter it in the database.
 
Can you create a query that joins both of the groups and then use that table for the drop down/list box. Set Limit To List for the control to Yes, so that you cannot enter it. You can add the Store/No Store field to the query, but do not show that column in your drop down/list box. Then use the AfterUpdate event of the control to either store it or not store it depending on what the value is chosen and if the value in the next column is Store or No Store.

If you have 3 columns 1st what you want to show, 2nd what you want to store, and 3rd is whether you should store it or not. Set ColumnCount = 3, Bound Column = 2, ColumnWidths = 1,0,0 so that the last 2 columns do not show. In the afterupdate you should access ListBox1.Columns(2) since this is zero bound and will refer to the 3rd column of what is chosen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top