Combobox list change after use it (1 Viewer)

TesZero

New member
Local time
Today, 10:20
Joined
Jul 15, 2014
Messages
6
Hello.

I am doing a checklist database.

With some other data, i have a field called "Local". (combobox)

In that "Local" field i must select the place where the checklist is made.

So, i have 20 places to do checklists, and when i select one place and save the check list, i need that "local" is disable from my combobox list so i dont accidentally repeat it.

My combobox is based in a table query.

I must do 2 checklists per day for each those 20 places...

And i cant figure out how to remove those items after use them at the moarning... and have them avaible again in the afternoon.

Thanks for your attention in advance, hope someone can help me :)

Regards, :)
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 18:20
Joined
Jul 9, 2003
Messages
16,282
Have your combobox row source as a table. Add an extra field to that table, "fldFlag" (a boolean field) use the after update event of the combobox to set the Flag to true for the value you select, refresh the combo so that the selected record is hidden.
 

TesZero

New member
Local time
Today, 10:20
Joined
Jul 15, 2014
Messages
6
Hello, first of all, thank you very much for your answers.

I solved my problem, maybe not in the right way, but it is working fine

So... what i done was:

I created a table with ID, Local_name, Shift1, Shift2, Shift3

then, i created a continues form with this table fields.

When i open my main form, and after select the Local in my combobox, my combobox open the Local_Form hidden, it makes a filter by local_name and depending the time it writes a "1" in the correct shift for the local_name.
After it, my combobox query (show all exept the "1" field" is refreshed
If the swift changes, it writes "0" in all fields so we can select all local_name again.

I should do it without opening a hidden form, writing directly in the table... but it is working fine and i have a lot of work to do...
i need to migrate all of this to .Net in the future, so for now... it is fine and working.

If someone needs to do it and need help, i can try to explain it better and with printscreens.

Regards,
Thank you for all,
Pedro Silva
 

Users who are viewing this thread

Top Bottom