update two tables from one query

  • Thread starter Stuart E. Wugalter
  • Start date
S

Stuart E. Wugalter

I have a query (assigned to a form button) that allows the users to replace
values in a table:

UPDATE tblSEQTAQ AS A
SET A.taqcall = [Enter a Value for Allele 1:]
WHERE (((A.taqcall)="Allele 1"));

The user now wants to show the value that she entered to replace the string
"Allele 1" on the form. I thought that if I created a second small table to
store the values she enters I could use that as the source for the
information she wants shown. However, I cannot figure out the correct SQL
statements to do this.

I would be most appreciative if someone could help me create the query or
suggest another solution. TIA

Sincerely,

Stuart E. Wugalter
Department: Zilkha Neurogenetic Institute
Division: Keck School of Medicine
University of Southern California
Telephone: (323) 442-1080
FAX: (323) 442-3054
E-Mail: (e-mail address removed)
 
M

Michel Walsh

Hi,


If you want see modifications brought by other users (VBA code modifying
data is definitively not the same user than the one typing on the keyboard)
to your records of your recordset, you need to refresh the recordset, the
form, and, if the modification may influence a form computed value, recalc:

Me.Refresh
Me.Recalc


Hoping it may help,
Vanderghast, Access MVP
 
S

Stuart E. Wugalter

Thank you for your suggestion. However, I am trying to do this with SQL. I
am very unfamiliar with VBA in Access. Regards, Stuart


Michel Walsh said:
Hi,


If you want see modifications brought by other users (VBA code modifying
data is definitively not the same user than the one typing on the keyboard)
to your records of your recordset, you need to refresh the recordset, the
form, and, if the modification may influence a form computed value, recalc:

Me.Refresh
Me.Recalc


Hoping it may help,
Vanderghast, Access MVP



Stuart E. Wugalter said:
I have a query (assigned to a form button) that allows the users to replace
values in a table:

UPDATE tblSEQTAQ AS A
SET A.taqcall = [Enter a Value for Allele 1:]
WHERE (((A.taqcall)="Allele 1"));

The user now wants to show the value that she entered to replace the string
"Allele 1" on the form. I thought that if I created a second small table to
store the values she enters I could use that as the source for the
information she wants shown. However, I cannot figure out the correct SQL
statements to do this.

I would be most appreciative if someone could help me create the query or
suggest another solution. TIA

Sincerely,

Stuart E. Wugalter
Department: Zilkha Neurogenetic Institute
Division: Keck School of Medicine
University of Southern California
Telephone: (323) 442-1080
FAX: (323) 442-3054
E-Mail: (e-mail address removed)
 
S

Stuart E. Wugalter

Perhaps this will help. There is a one to many relationship between the two
tables. tblseqtaq is the many side of the relationship. When the user enters
a value for "Allele 1," I want the value for Allele 1 to be changed in both
tables. The SQL statement below is what I am working on thus far. (It has a
syntax error somewhere.)

UPDATE tblseqtaq AS A
INNER JOIN [A tbltaqmanreplacementstrings]
ON A.taqcall = tbltaqmanreplacementstrings.taqcall
SET [A tbltaqmanreplacementstrings].taqcall = [Enter a Value for Allele 1:]
WHERE A.taqcall="Allele 1";

Thanks Again, Stuart

Stuart E. Wugalter said:
Thank you for your suggestion. However, I am trying to do this with SQL. I
am very unfamiliar with VBA in Access. Regards, Stuart


Michel Walsh said:
Hi,


If you want see modifications brought by other users (VBA code modifying
data is definitively not the same user than the one typing on the keyboard)
to your records of your recordset, you need to refresh the recordset, the
form, and, if the modification may influence a form computed value, recalc:

Me.Refresh
Me.Recalc


Hoping it may help,
Vanderghast, Access MVP



Stuart E. Wugalter said:
I have a query (assigned to a form button) that allows the users to replace
values in a table:

UPDATE tblSEQTAQ AS A
SET A.taqcall = [Enter a Value for Allele 1:]
WHERE (((A.taqcall)="Allele 1"));

The user now wants to show the value that she entered to replace the string
"Allele 1" on the form. I thought that if I created a second small
table
to
store the values she enters I could use that as the source for the
information she wants shown. However, I cannot figure out the correct SQL
statements to do this.

I would be most appreciative if someone could help me create the query or
suggest another solution. TIA

Sincerely,

Stuart E. Wugalter
Department: Zilkha Neurogenetic Institute
Division: Keck School of Medicine
University of Southern California
Telephone: (323) 442-1080
FAX: (323) 442-3054
E-Mail: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top