Access 2007 PARAMETER

  • Thread starter Thread starter Alexey
  • Start date Start date
A

Alexey

Hi

Is there an issue with PARAMETER in Access 2007. i have an application
which runs perfectly well in 2002 / 2003 but when we run a function in
Access 2007, we get an '3139 Syntax error in PARAMETER clause' message?

Thanks
A
 
when we run a function in Access 2007, we get an '3139 Syntax error in
PARAMETER clause' message?
You did not say what function is giving you the errors.
How are you formatting the PARAMETER? Post your SQL.
 
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord

'send copy of feedback to tutor by email
Dim TutorEmail As String
Dim FeedBackMail As String
Dim msg As String
Dim subj As String
Dim r As Long
Dim EmailToStudent As Boolean

If Nz(Me![Primary Email], "") <> "" And Me![Feedback Method] = "Email"
Then
EmailToStudent = True
Else
EmailToStudent = False
End If

If EmailToStudent Then
msg = "Would you like to email the student"
msg = msg & vbNewLine
msg = msg & "or print preview the report?"
msg = msg & vbNewLine & vbNewLine
msg = msg & "Yes to email them"
msg = msg & vbNewLine
msg = msg & "No to print preview"
msg = msg & vbNewLine
msg = msg & "or cancel"
r = MsgBox(msg, vbYesNoCancel + vbQuestion, "Email to Student")
Select Case r
Case vbYes
EmailToStudent = True
Case vbNo
EmailToStudent = False
Case vbCancel
GoTo btnFeedbackScores_Click_exit
End Select
End If

If EmailToStudent Then
msg = "Hi " & Nz(Me![Nickname], Me![Forename]) & ","
msg = msg & vbNewLine & vbNewLine
msg = msg & "You will find attached the marks & feedback for module "
& Me![cboModule] & " which you submitted recently."
msg = msg & vbNewLine & vbNewLine
msg = msg & "This message has been sent from the Administration
offices. If you have and comments or wish to discuss the feedback please
contact your tutor, and not the office. Your tutor will have been sent a
copy of this message. "
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "The attached file is in Microsoft Snapshot format, and if
you have Microsoft Access installed on your computer you should be able to
read the file. However, if it is not installed, or you are having any
difficulty in opening or reading the file, please go to the Student
Resources Area of the xxx web site where you will be able to download the
snapshop viewer free of charge."
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "Administration Team"
subj = "Feedback for Module " & Me![cboModule]
DoCmd.SendObject acSendReport, "rptStudentMarkingFeedbackLetter",
"Snapshot Format (*.snp)", Me![Primary Email], , , subj, msg, True
Else
DoCmd.OpenReport "rptStudentMarkingFeedbackLetter", acViewPreview, , ,
acDialog
End If

Me![StuModFeedbackSentOn] = Now()

TutorEmail = Nz(DLookup("(e-mail address removed)
 
Someone else will need to help you with this one.
--
KARL DEWEY
Build a little - Test a little


alex said:
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord

'send copy of feedback to tutor by email
Dim TutorEmail As String
Dim FeedBackMail As String
Dim msg As String
Dim subj As String
Dim r As Long
Dim EmailToStudent As Boolean

If Nz(Me![Primary Email], "") <> "" And Me![Feedback Method] = "Email"
Then
EmailToStudent = True
Else
EmailToStudent = False
End If

If EmailToStudent Then
msg = "Would you like to email the student"
msg = msg & vbNewLine
msg = msg & "or print preview the report?"
msg = msg & vbNewLine & vbNewLine
msg = msg & "Yes to email them"
msg = msg & vbNewLine
msg = msg & "No to print preview"
msg = msg & vbNewLine
msg = msg & "or cancel"
r = MsgBox(msg, vbYesNoCancel + vbQuestion, "Email to Student")
Select Case r
Case vbYes
EmailToStudent = True
Case vbNo
EmailToStudent = False
Case vbCancel
GoTo btnFeedbackScores_Click_exit
End Select
End If

If EmailToStudent Then
msg = "Hi " & Nz(Me![Nickname], Me![Forename]) & ","
msg = msg & vbNewLine & vbNewLine
msg = msg & "You will find attached the marks & feedback for module "
& Me![cboModule] & " which you submitted recently."
msg = msg & vbNewLine & vbNewLine
msg = msg & "This message has been sent from the Administration
offices. If you have and comments or wish to discuss the feedback please
contact your tutor, and not the office. Your tutor will have been sent a
copy of this message. "
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "The attached file is in Microsoft Snapshot format, and if
you have Microsoft Access installed on your computer you should be able to
read the file. However, if it is not installed, or you are having any
difficulty in opening or reading the file, please go to the Student
Resources Area of the xxx web site where you will be able to download the
snapshop viewer free of charge."
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "Administration Team"
subj = "Feedback for Module " & Me![cboModule]
DoCmd.SendObject acSendReport, "rptStudentMarkingFeedbackLetter",
"Snapshot Format (*.snp)", Me![Primary Email], , , subj, msg, True
Else
DoCmd.OpenReport "rptStudentMarkingFeedbackLetter", acViewPreview, , ,
acDialog
End If

Me![StuModFeedbackSentOn] = Now()

TutorEmail = Nz(DLookup("(e-mail address removed)
 
Thanks for looking anyway

A

KARL DEWEY said:
Someone else will need to help you with this one.
--
KARL DEWEY
Build a little - Test a little


alex said:
If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord

'send copy of feedback to tutor by email
Dim TutorEmail As String
Dim FeedBackMail As String
Dim msg As String
Dim subj As String
Dim r As Long
Dim EmailToStudent As Boolean

If Nz(Me![Primary Email], "") <> "" And Me![Feedback Method] = "Email"
Then
EmailToStudent = True
Else
EmailToStudent = False
End If

If EmailToStudent Then
msg = "Would you like to email the student"
msg = msg & vbNewLine
msg = msg & "or print preview the report?"
msg = msg & vbNewLine & vbNewLine
msg = msg & "Yes to email them"
msg = msg & vbNewLine
msg = msg & "No to print preview"
msg = msg & vbNewLine
msg = msg & "or cancel"
r = MsgBox(msg, vbYesNoCancel + vbQuestion, "Email to Student")
Select Case r
Case vbYes
EmailToStudent = True
Case vbNo
EmailToStudent = False
Case vbCancel
GoTo btnFeedbackScores_Click_exit
End Select
End If

If EmailToStudent Then
msg = "Hi " & Nz(Me![Nickname], Me![Forename]) & ","
msg = msg & vbNewLine & vbNewLine
msg = msg & "You will find attached the marks & feedback for module
"
& Me![cboModule] & " which you submitted recently."
msg = msg & vbNewLine & vbNewLine
msg = msg & "This message has been sent from the Administration
offices. If you have and comments or wish to discuss the feedback please
contact your tutor, and not the office. Your tutor will have been sent a
copy of this message. "
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "The attached file is in Microsoft Snapshot format, and
if
you have Microsoft Access installed on your computer you should be able
to
read the file. However, if it is not installed, or you are having any
difficulty in opening or reading the file, please go to the Student
Resources Area of the xxx web site where you will be able to download
the
snapshop viewer free of charge."
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & vbNewLine & vbNewLine
msg = msg & "Administration Team"
subj = "Feedback for Module " & Me![cboModule]
DoCmd.SendObject acSendReport, "rptStudentMarkingFeedbackLetter",
"Snapshot Format (*.snp)", Me![Primary Email], , , subj, msg, True
Else
DoCmd.OpenReport "rptStudentMarkingFeedbackLetter", acViewPreview,
, ,
acDialog
End If

Me![StuModFeedbackSentOn] = Now()

TutorEmail = Nz(DLookup("(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

Back
Top