0
votes

I am a newbie to Access and have been struggling with the below - putting just simple names to ease the explanation:

1- I have form1 related to table1 and form2 related to table2

2- One of the fields in form2 is the primary key of table1. Another field in form2 is a date

3- Once that date in form2 is filled in, I would like to take the value to a date field in table1 - in the record identified by table1´s primary key, which I already know

How can I do that? Putting it simply, it would be like a dlookup but in the reverse order, i.e., instead of reading data from another table to put in my current form, I want to take data from my current form and put it in another table.

I have VBA skills but no sql...

Thank you very much!

1
Use a query that joins Table1 and Table2 data as the recordsource for Form 2.KacireeSoftware
You are going to have to spend some time looking into this. Youtube has some very thorough tutorials on how to do things like you are asking. Simply search using this: Microsoft Access Insert Update DeleteBobSki
Here's a very similar question. But I think you might want to first review the basics of an sql UPDATE statementMoondogsMaDawg
Thank you all - I will address the above and revert.ick64
Dear all,I got to make the UPDATE statement work - as per the below. The only problem is that instead of taking the values that I defined, Access prompts me inputboxes to input the data:ick64

1 Answers

0
votes

I got to make the UPDATE statement work - as per the below. The only problem is that instead of taking the values that I defined, Access prompts me inputboxes to input the data, and if I do it then I get to update the other table:

SQL = "UPDATE tabSolic_Orcamento " & _
"SET tabSolic_Orcamento.DataEnvio = Me.DataEmissao " & _
"WHERE ((tabSolic_Orcamento.Código = Me.NumSolic)) "

enter image description here

Thanks again!