Copy Records

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
 
S

Stefan Hoffmann

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 <--
 

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