Saving data from a textbox in a query using a condition (1 Viewer)

Nab

New member
Local time
Today, 17:05
Joined
Jul 1, 2019
Messages
2
Hello. hope everybody is fine there. i need a little help.
i have a table named "Table1" having fields "Number" and "Hrs". The table has multiple records already. And a form having a combo box and textbox named as "combo1" and "text1". There is a button in form aswell named as "search"
what i want to do is.
That when combo1=65, the value in the textbox1 to be stored only in those records in the field "Hrs" in "Table1" where "Number" is 65. The function i mentioned must be executed after clicking "search" button.
Any suggestion??
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 00:05
Joined
Jan 20, 2009
Messages
12,849
Typically a bound form would be used with Hrs as the ControlSource of the combo.

Maybe tell us more about your project so we have a better idea of the context of your question.
 

Nab

New member
Local time
Today, 17:05
Joined
Jul 1, 2019
Messages
2
i want to amend values in a table but in a specific field named as "Hrs", whenever i click button search. but only those records in table1 to be amended where the field value in "Number" field is 65.
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 00:05
Joined
Jan 20, 2009
Messages
12,849
An update query?
Code:
UPDATE Table1
SET somefield = something
WHERE [Hrs] = Forms!formname.combo1
 

Users who are viewing this thread

Top Bottom