Update table based on bound text box (1 Viewer)

inkbird01

New member
Local time
Today, 19:35
Joined
Oct 5, 2022
Messages
20
Hi, I have a form that populates information from tbl_home. The bound text box on the form is txt_ID

How do I update column tbl_home.Project where form.txt_ID = tbl_home.ProjectID?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:35
Joined
Oct 29, 2018
Messages
21,555
Hi. Welcome to AWF!

Not sure I understand your question; but if the form is bound to the same table you want to update, then just do it on the form.
 

inkbird01

New member
Local time
Today, 19:35
Joined
Oct 5, 2022
Messages
20
Hi. Welcome to AWF!

Not sure I understand your question; but if the form is bound to the same table you want to update, then just do it on the form.
Thanks! I want to update records in the tbl_home table where the text box parameter = tbl.home.projectID
 

theDBguy

I’m here to help
Staff member
Local time
Today, 11:35
Joined
Oct 29, 2018
Messages
21,555
Thanks! I want to update records in the tbl_home table where the text box parameter = tbl.home.projectID
Sorry, still don't understand the question. Are you able to post some screenshots?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 14:35
Joined
May 21, 2018
Messages
8,610
Post your database or provide a well explained issue. Put some effort into asking a question if you expect anyone to bother putting in effort to answer it.
 

inkbird01

New member
Local time
Today, 19:35
Joined
Oct 5, 2022
Messages
20
My append query is


SQL:
UPDATE tbl_home SET tbl_home.IsActive = "FALSE"
WHERE (((tbl_home.ProjectID)=[Forms]![frm_ProjectDetails]![txt_projectID]));

But I get the "enter parameter dialogue box"
The form text box is bound, is this the issue?
 

inkbird01

New member
Local time
Today, 19:35
Joined
Oct 5, 2022
Messages
20
see
Post your database or provide a well explained issue. Put some effort into asking a question if you expect anyone to bother putting in effort to answer it.
See response
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 14:35
Joined
May 21, 2018
Messages
8,610

Gasman

Enthusiastic Amateur
Local time
Today, 19:35
Joined
Sep 21, 2011
Messages
14,476
My append query is


SQL:
UPDATE tbl_home SET tbl_home.IsActive = "FALSE"
WHERE (((tbl_home.ProjectID)=[Forms]![frm_ProjectDetails]![txt_projectID]));

But I get the "enter parameter dialogue box"
The form text box is bound, is this the issue?
And the parameter is? :(
If IsActive is Boolean (which is would be in any of my DBs) then you just use False, without any quotes, which just makes a string.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:35
Joined
Feb 19, 2002
Messages
43,519
UPDATE tbl_home SET tbl_home.IsActive = False
WHERE (((tbl_home.ProjectID)=[Forms]![frm_ProjectDetails]![txt_projectID]));

True and False are NOT strings. They are boolean values 1 and 0 although, Access uses -1 and 0.

Also, we have no idea what the context is or why you are trying to update a second table from I presume a form. Logically, this is probably wrong.

We also have no idea how/where you are running the query so the solution I suggested may not help at all.
 

Users who are viewing this thread

Top Bottom