H
headly
So I have a form with some command buttons.
The buttons I have a problem with are
A) Filter by Selection;
B) Send to Word or Excel
The problem with A) Filter by Selection, the button doesn't use the
currently selected form field, it applies the last used Filter by Selection.
I added the code
' Screen.ActiveForm.ActiveControl.SetFocus
' Screen.ActiveControl.SetFocus
with no luck.
The problem with B) Send to Word/Excel is that the command sends all
database records and I only want to send the current/active record. The code
currently looks like this:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
DoCmd.RunCommand acCmdOutputToRTF
DoCmd.RunCommand ac
oApp.Visible = True
I'm guessing I need to somehow assign the current record to some record
object then only send that item, it this do-able;
Code examples highly appreciated. THX!
The buttons I have a problem with are
A) Filter by Selection;
B) Send to Word or Excel
The problem with A) Filter by Selection, the button doesn't use the
currently selected form field, it applies the last used Filter by Selection.
I added the code
' Screen.ActiveForm.ActiveControl.SetFocus
' Screen.ActiveControl.SetFocus
with no luck.
The problem with B) Send to Word/Excel is that the command sends all
database records and I only want to send the current/active record. The code
currently looks like this:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
DoCmd.RunCommand acCmdOutputToRTF
DoCmd.RunCommand ac
oApp.Visible = True
I'm guessing I need to somehow assign the current record to some record
object then only send that item, it this do-able;
Code examples highly appreciated. THX!