J
Jackson via AccessMonster.com
Hi,
I've got a macro converted to a module which emails a query to a few people
in excel format. I need to format some of the fields to 4 decimal places and
have no idea how to begin (can't write VBA), can anyone help me?
Do I have to insert something like Format(myquery,[FieldtoFormat],4) - am I
on the right track?
Here's my code for it: let me know if you have any ideas, bearing in mind I
am very beginner with VBA...
Option Compare Database
'------------------------------------------------------------
' mcrEmail
'
'------------------------------------------------------------
Function mcrEmail()
On Error GoTo mcrEmail_Err
DoCmd.SendObject acQuery, "qryUpcomingExpiry", "MicrosoftExcelBiff8(*.xls)",
"address1", "Adress2", "", "MySubject", "My Body.", True, ""
MsgBox "Email Sent Successfully", vbInformation, "Email Status"
mcrEmail_Exit:
Exit Function
mcrEmail_Err:
MsgBox "Email has not been Sent", vbInformation, "Email Status"
Resume mcrEmail_Exit
End Function
I've got a macro converted to a module which emails a query to a few people
in excel format. I need to format some of the fields to 4 decimal places and
have no idea how to begin (can't write VBA), can anyone help me?
Do I have to insert something like Format(myquery,[FieldtoFormat],4) - am I
on the right track?
Here's my code for it: let me know if you have any ideas, bearing in mind I
am very beginner with VBA...
Option Compare Database
'------------------------------------------------------------
' mcrEmail
'
'------------------------------------------------------------
Function mcrEmail()
On Error GoTo mcrEmail_Err
DoCmd.SendObject acQuery, "qryUpcomingExpiry", "MicrosoftExcelBiff8(*.xls)",
"address1", "Adress2", "", "MySubject", "My Body.", True, ""
MsgBox "Email Sent Successfully", vbInformation, "Email Status"
mcrEmail_Exit:
Exit Function
mcrEmail_Err:
MsgBox "Email has not been Sent", vbInformation, "Email Status"
Resume mcrEmail_Exit
End Function