I want to automatically change the value in a Combo Box

othmanyg

Registered User.
Local time
Today, 21:17
Joined
Feb 1, 2000
Messages
43
I have a combo box on a form (RepairFrm) that its Control Source is another table (EquipTbl). This combo box has two options, either Available or Loaned. I want to be able to automatically set the value to LOANED when i choose any record from the (EquipTbl). This is to indicate that the equipment is already loaned so i have to choose another one from the (EquipTbl).

Note that i already have a Dlookup function that extracts the data of the loaned euipment from (EquipTbl) once i choose the equipment ID.

Your help is much appreciated.
Yasser
 
I'm not sure I fully understand what you want, but here goes:

1. You select an item from the Equip table.
2. If that item is allready out, you want something on the form to indicate that.
3. When you select an item that is not out and you "tag" it for use, the loaned out field must be updated to Loaned.

Is that about right?

Mitch
 
Here is more clarification

Thanks for the reply,

Your are right that's what i want and here is more details:

I attached the DB for further clarification. Now i have RadioFrm, what i need is that whenever i select a Physical ID under Issued Temporary Equipment in that form, the status field is automatically changed to LOANED and also gets updated in the Issdtbl in the same field LOAN.

I hope this is now clear.
best regards,
Yasser
 

Attachments

Sorry about the deley, I have been fighting my new firewall dropping my connection.

Now i see what you want to do better.

Waht you need to do is do is somethig like this:

1. On the combobox LOAN (you may want to change the Name of that to something linke cbxLOAN, sometimes referencing a control with the same name as the field gets confusing) in the AfterUpdate, you want to run a qeury to update the table Issdtbl, actually you need to do an append to that table, depending on how that table is actually getting appended.

2. You can do that with a nromal query and call it in code and in the query reference the LOAN field for the status or to it with a SQL string in code and run that.

Hope this helps.
 
It works

Thanks very much mmitchell for the clue, it works well.

I do appreciate the time you took to reply.

Good day,
 

Users who are viewing this thread

Back
Top Bottom