S
Shirly
First sorry for my poor English, this is not my native language.
I have the folowing problem,
On a form i can enter values for a specific product, on the form a
autonr field is present (IDnr)
I want to print a report from this product after calculations
- these are done in div querys & tablemake querys
- for the report aditional data must be recoverd & calculated.
The code wont run, he gives the following error.
Can not find field | in expresion..
I cant find where i'm going wrong.
? maby someone can help me out here ?
I have the folowing code now onder a buton on my form
Private Sub Next_Click()
On Error GoTo Next_Click_Err
'declare varible
Dim intID as Integer
'give value to varible
intID = [Forms]![result]![IDnr]
'close forms so querys can be executed
DoCmd.Close acForm, result, asSaveYes
'set warnings off
DoCmd.SetWarnings False
'execute querys
DoCmd.OpenQuery "query1"
' --- whole list with querys to run
DoCmd.OpenQuery "guery31"
'set warnings on
DoCmd.SetWarings True
'print specific report from product selected on begining
DoCmd.OpenReport "R_AC",acviewPreview, "", "& intID,acNormal
'reopen form
DoCmd.OpenForm [F0113_result], acNormal
Next_Click_Exit:
Exit Sub
Next_Click_Err:
MsgBox Error$
Resume Next_Click_Exit
End Sub
Kind Regards
Shirly
I have the folowing problem,
On a form i can enter values for a specific product, on the form a
autonr field is present (IDnr)
I want to print a report from this product after calculations
- these are done in div querys & tablemake querys
- for the report aditional data must be recoverd & calculated.
The code wont run, he gives the following error.
Can not find field | in expresion..
I cant find where i'm going wrong.
? maby someone can help me out here ?
I have the folowing code now onder a buton on my form
Private Sub Next_Click()
On Error GoTo Next_Click_Err
'declare varible
Dim intID as Integer
'give value to varible
intID = [Forms]![result]![IDnr]
'close forms so querys can be executed
DoCmd.Close acForm, result, asSaveYes
'set warnings off
DoCmd.SetWarnings False
'execute querys
DoCmd.OpenQuery "query1"
' --- whole list with querys to run
DoCmd.OpenQuery "guery31"
'set warnings on
DoCmd.SetWarings True
'print specific report from product selected on begining
DoCmd.OpenReport "R_AC",acviewPreview, "", "& intID,acNormal
'reopen form
DoCmd.OpenForm [F0113_result], acNormal
Next_Click_Exit:
Exit Sub
Next_Click_Err:
MsgBox Error$
Resume Next_Click_Exit
End Sub
Kind Regards
Shirly