Copy Records

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

Hi, need some help. I Have 03 objects involved and I need to copy the results
from a query to a table. The facts are.
1. Table: tBaseAuto > KeyTable: CodPro > Column to be fullfill: PreMin_Tot
2. Query: QryCosTotali
3. Form: InsMinimumPrice

I'm trying to close the Form.InsMinimumPrice the "code" take all the values
from the QryCosTot.appMinTot and copy into tBaseAuto.PreMin_Tot

I tryed with this:

Private Sub Form_Close()
Dim strsqlC As String
strsqlC = " update tBaseAuto " & _
" Set tBaseAuto.PreMin_Tot = QryCosTotali.appMinTot" & _
" where tBaseAuto.CodPro = QryCosTotali.CodPro"
CurrentDb.Execute strsqlC
Me.Requery
End Sub

It's not working! Any idea?
Thanks in advance for your help
 
hi Luis,
It's not working! Any idea?
Create this kind of query in the query designer using table alias names.
When you're finished copy its SQL statement into your method.

The problem is, that your syntax is wrong.


mfG
--> stefan <--
 
Back
Top