If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Clear Query in Drop-Down Box
I have a form where the drop down box is attached to a query inside the SQL
string to pull a name of an approved authorizer, and another drop-down box (similar design) for approved requestors of priority work requests. When you click on the box, you are asked for part of a name. It will then search and pull the names within that search so that you are not searching through hundreds of names of requestors or authorizers. It works great until you go to the next records (or new records for that matter. It will still hold the information from the last time you entered it and will not allow a clearing of the information. I have tried a macro, but that just makes the form act really wierd. Any ideas or advice on how I can work around (or with) this? Rattler0812 |
#2
|
|||
|
|||
Clear Query in Drop-Down Box
Since the value in the combo box (drop down) is not staying in sync with the
record on your form, that indicates it is an unbound control. This is normal behaviour for unbound controls. Because the combo is being used as a search tool, it is correct for it to be an unbound control. Although it is really of no consequence what the value of the combo is, it will not affect anything else unless something in the code in your form uses that value and expects it to be related to the record on your form. If you have a large number of rows returned by your combo, keeping it in sync with the current record will be a performance hit, but the technique to do this would be to use the current event of the form: Me.MyCombo = Me.TheBoundControl Where TheBoundControl would be the control on your form that hold the requestor or authorizer. Since it is only a search control, I would just clear it out with: Me.MyCombo = Null Also in the Current event. "rattler0812" wrote: I have a form where the drop down box is attached to a query inside the SQL string to pull a name of an approved authorizer, and another drop-down box (similar design) for approved requestors of priority work requests. When you click on the box, you are asked for part of a name. It will then search and pull the names within that search so that you are not searching through hundreds of names of requestors or authorizers. It works great until you go to the next records (or new records for that matter. It will still hold the information from the last time you entered it and will not allow a clearing of the information. I have tried a macro, but that just makes the form act really wierd. Any ideas or advice on how I can work around (or with) this? Rattler0812 |
Thread Tools | |
Display Modes | |
|
|