Solved Run an Update Query using the Data within a Form (1 Viewer)

Number11

Member
Local time
Today, 01:15
Joined
Jan 29, 2020
Messages
607
Hi all,
So i need to run an update query to un-allocate from one user to another

form has two comb boxes - so user name can be selected

From
To

Query has

to: [Forms]![Reallocate].[To]
criteria [Forms]![Reallocate].[From]

no records are found when calling from form, but if i run query and enter names it works fine?

Update - OK so if i convert the combo box to text box it works :) - shame as wanted to use the combo box select user list :(
 
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:15
Joined
Feb 28, 2001
Messages
27,001
The problem you describe is often caused by referencing the wrong column. How did you define the .RowSource of the combo?

IF it had more than one field in it, particularly if one was a numeric key, it might have occurred that you referenced the wrong column of the combo.


When referencing a value from a control that HAS a value, you don't need to identify that you want the .Value property because that is the default. But a multi-column combo box has a little more than that to consider. There. the default value is the bound column from the selected row. So if what you wanted wasn't the bound column, you get the mismatch.
 

Users who are viewing this thread

Top Bottom