Email Current record

seirra

Board Regular
Joined
Nov 7, 2002
Messages
72
Good day
My scripting skills are Nil and hoping for some help or direction where I can find the answer everything I have come across doesn’t seem to fit or be from a much older version of Access it doesn’t seem to work in Access 2010.

I would like to email just the current record I have on the screen. I have placed an email button thought the wizard but it will only email all 5000 records. How do I go about limiting it to just the current record?

Thanks for any and all assistance



Private Sub Command325_Click()
On Error GoTo Err_Command325_Click

Dim stDocName As String

stDocName = "Rpt_Word_orders"
DoCmd.SendObject acReport, stDocName

Exit_Command325_Click:
Exit Sub

Err_Command325_Click:
MsgBox Err.Description
Resume Exit_Command325_Click

End Sub
 
Australia and New Zealand were fantastic!

It just occurred to me that Prime Key may not be the name of your field and that you might be confusing that with the concept of a primary key. It's an odd name for a table field. To know which record to restrict this to,
- I need to know which field is the primary key for the query behind your form (please tell me this is not a subform).
- Also, let me know if the records in this form are in a datasheet, continuous form or a form that displays only a single record when opened.
- Post the sql for the query behind your form and identify which of those fields is the primary key for the record. The underlying query for the report must contain this field also.
I'll wait for your response before delving into it further.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,215,480
Messages
6,125,048
Members
449,206
Latest member
Healthydogs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top