How convert Docmd.Domenuitem
I'm converting a 97 db to 2000.
A form has a button that executes a Docmd.Domenuitem command.
This is supposed to invoke Find and Replace. It does, but the subject is
grayed out. I need the find to be based on the control where the cursor was
when the button was pressed. Any ideas? Access help in 2000 does not even
mention this command neither does my Access book.
Maybe you need to do
On Thu, 29 Sep 2005 13:43:03 -0700, "mscertified" <email@example.com>
>I'm converti...Is it true about DoCmd.SendObject
That DoCmd.SendObject will find your default Mail client?
Thanks in advance for any help with this......Bob
MS Access 2007 accdb
Windows XP Home Edition Ver 5.1 Service Pack 3
"Bob Vance" <firstname.lastname@example.org> wrote in message
> That DoCmd.SendObject will find your default Mail client?
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
It's true if your default Mail client is Outlook :~)
...When I close a form with DoCmd.Close I get a parameter popup
This is a repost. I will try to explain the problem a little better than I
did the last time.
When I execute DoCmd.Close on one of my forms I get one of those little
unknown parameter popups, the kind you get when there's something wrong with
your query. But all I'm trying to do is close the form, not read any data.
This popup appears to be gernerated by the row source query in a list box on
the form. This row source query references another text box on the form and
this appears to be what the popup is asking for. But there's a value in
this text box. And why should th...Help with "Form DoCmd.Open and DoCmd.Close
The following two lines of code is not operating correctly.
Private Sub cmdChangeVendor1_Click()
DoCmd.Close acForm, "Invoice by Market Reviewer"
DoCmd.OpenForm "Selections Vendor and Reviewer", acNormal
When I click on the cmdChangeVendor1 button, I expect the form "Invoice by
Market Reviewer" to close and the form "Selections Vendor and Reviewer" to
open. But that is not the result I get. The form "Invoice by Market Reviewer"
closes but that is about it. Nothing else opens. I have two forms that
behaves this way. I have ...docmd.runcmd SQL functions
I have a table with fields a,b,c,d. If I have a row (x) where x.d is
blank, I want to search the table and see if there is a row (y) such
that x.c=y.c and x.b=y.b and if y.d is not blank, then I want x.d to
be filled in with y.d.
I can't seem to figure out how to start this.
Frankly, you don't want to do this. You have an un-normalized data model
and you are storing redundant data. If b and c determine d, then that
should be stored *once* a record in its own table.
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want ans...DoCmd.FindRecord Error
My code has a function to find a record. The function is called by 2
separate search forms, each of which generates SQL for a query that builds a
table of record keys of all qualifying recs. When there is only 1 qualifying
rec, the function is called to open the primary form (Member Data) to the
The function uses the rec in the new results table ( a long int ) as the
argument for the FindRecord.
When called by 1 of the forms, it works properly. When called by the second
form it fails on the DoCms.FindRecord line with Runtime error 2162: "A macro
set to 1 of th...DoCmd.OpenReport
Can someone please help me get the " and ' right for this? (PARTNUMBER is a
text field). I just can't get it...argh!
DoCmd.OpenReport stDocName, acPreview, , "[PARTNUMBER] =" ' "&
Me.PARTNUMBER" ' "
DoCmd.OpenReport stDocName, acPreview, , "[PARTNUMBER] =""" &
Me.PARTNUMBER & """"
Microsoft Access MVP
"Gina K" wrote:
> Can someone please help me get the " and ' right for this? (PARTNUMBER is a
> text field). I just can't get it...argh!
>...DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8
I have vba that will import the data from Excel file. Is it possible to
append the data from excel file to a table in Access in such a way that
excel file does not have a field's name? When I run this transferspreadsheet
command, it comes in as F1, F2,.....
On Mar 3, 3:08=A0pm, "Boon" <boonyawat.la-ongth...@cnh.com> wrote:
> I have vba that will import the data from Excel file. Is it possible to
> append the data from excel file to a table in Access in such a way that
> excel file does not have a field's n...Comact & Repair using DoCmd
I would like to set somw databases to compact & repair when a form is opened
(using a macro that opens the form from the task scheduler). I tried the
following code on form load but it wants to create a new table. instead of
running compact & repair:
Private Sub Form_Load()
DoCmd.DoMenuItem acForm, acTools, acDatabaseUtilities,
"Alan" <Alan@discussions.microsoft.com> skrev i melding
>I would like to set somw databases to compact &...docmd.sendobject
Outlook 2003 does not accept message text from DoCmd.SendObject command in
All other fields pass to the message fine.
Is there a setting in outlook 2003 that causes this?
It works fine if I use Outlook 97 as my default mail program.
DoCmd.SendObject , , "MSTXT", "recipient", "cc", "bcc", "subject", "Message
The behavior of the DoCmd.SendObject method seems to be arbitrary in regards
to which eMail client it selects to do the sending. Sometimes it selects
Outlook Express, sometimes it selects Outlook. We only use the scheduling
functions of Outlook through our Access app. No one here uses Outlook for
eMail - we all use Outlook Express. I don't see any way in the SendObject
method to specify which eMail client I want to use. Is anyone aware of a way
I can force it to always select Outlook Express?
Not strictly an Access Problem but,
Both Outlook & Express wants to be your default ...Filter expression passed with DoCmd
It appears that the filter expression passed to
a report as a part of the DoCmd expression
is not available in the Open code.
I.e., Me.Filter is null.
Oops, wrong group...........sorry
"Bill" <email@example.com> wrote in message
> It appears that the filter expression passed to
> a report as a part of the DoCmd expression
> is not available in the Open code.
> I.e., Me.Filter is null.
> When? OnLoad?
"Bill" <firstname.lastname@example.org> wrote in me...docmd.close
I have an autoExec to call my function and verify user log in information to
let user ue or close the application.
I use docmd.close which only support database object like tables, forms,
The MS Access stil open and run the main form.
Is it possible to close the MS Access before open and load the main form use
any other function?
Your information is great appreciated,
> Is it possible to close the MS Access before open and load the main form
> any other function?
Sorry, but I don't understand what you mean by that statement... but...
Is there a way to open a form without making it visible from the start?
Here's sample code to help explain:
DoCmd.OpenForm "form1", acNormal
Me.Visible = False
Me.Combo1.RowSource = ""
DoCmd.Close acForm, "Country_BT_Land_APAC", acSaveYes
The minor problem with this is that the form is visible for a split second,
and then becomes invisible - which looks like a flicker. Since I have to do
this with 4 forms at one time, there will be 4 flickers. I'm trying to
elimate the flicker problem.
Message posted via AccessMonster.com
I'm using the following code to save my record before printing it
If Me.Dirty Then Docmd.Save
I'm getting an error saying I have not specified the object
Do I have to specify 'table' and the table name each time I use this
statement, I thought it defaulted to the current object?
"mscertified" <email@example.com> wrote in message
> I'm using the following code to save my record before printing it
> If Me.Dirty Then Docmd.Save
> I'm getting an error saying I have not spec...Using DoCmd in an IF/Then statment
I am using the below coding, debug says there are no problems, but the Else
statement DoCmd will not run. Can anyone tell me what is wrong here?
MSGBOX "Do you wish to do another LRU update?", vbYesNo, "LRU UPDATE"
If vbYes Then
DoCmd.GoToControl "Serial Number"
DoCmd.Close acForm, "EDIT CDS LRU ASSET"
This has been answered already about 5 posts below this.
> I am using the below coding, debug says there are no problems, b...DoCmd.SearchForRecord
Can anyone tell me what is wrong with the following statement?
DoCmd.SearchForRecord acDataForm, DetailForm, acFirst, WhereCond
DetailForm = "frmDynDfltsDetail" frmDynDfltsDetail is a form that is
WhereCond = "kcoSinkTable = "PsgrService" AND kcoSinkField = "LoadFactor"
AND kcoSourceTable = "Options" AND kcoSourceField = "PsgrLoadFactor" "
kcoSinkTable, kcoSinkField, kcoSourceTable, and kcoSourceField are Combo
Boxes in frmDynDfltsDetail.
I get no error message when the DoCmd.SearchForRecord runs...DoCmd to delete records
I have a command button that when clicked deletes certain records from
a subform based on an application number being equal. It deletes all
records with the same applciation number as currently shown on the
main form, see code below:
DoCmd.RunSQL ("DELETE FROM tblAdultDetails WHERE
However I would like it to only delete records if the fields
[MainApplicantFlag] =1 or [PartnerFlag] =1 as well as ApplicationNum
being equal. These are both number fields btw.
Can someone tell me what I should add to my code in...DoCmd.OpenQuery
How can I use DoCmd.OpenQuery and not have it prompt that it is performing a
append or delete. I would like it to perform the operation without giving
me the warnings and just do it.
Example in use within Access VB:
DoCmd.OpenReport "rpt-ShowMonthlyUsage", acViewPreview
Or is there another method that I should be using?
Thank you in advance for your help,
On Wed, 7 Nov 2007 15:23:25 -0500, Michael Kintner wrote:
> How can I use DoCmd.OpenQuery and not have it prompt that it is performing a
Please kindly assist.
Every time I try to click the OK butto to open the report that I have created
It passes an error of
Run time error 2585, action cannot be carried out while processing a form or
report or event.
Below is the coding. in the Ok event procedure.
Private Sub cmdOK_Click()
Me.Visible = False
'DoCmd.OpenQuery "LicenseQueryB", acViewNormal, acEdit
DoCmd.OpenReport "Torrens Valley Firearms Report B", acViewNormal, acEdit
'DoCmd.Close acForm, "License DialogB"
Below is the coding for opening the Report which is call...Docmd.Movesize
I have the following code that I=92ve been using for several months.
It=92s used to adjust the size of a form based on the number of records:
Private Sub FormResize() 'code to resize both frmMainform and sfrm
Const DetailHeight =3D 240 'tried using me.detail.height but it didn't
'remember that the constant above will depend on how tall your textbox
Const FormTopMargin =3D 560
Dim lngRecordCount As Long
lngRecordCount =3D Me.sfrm.Form.RecordsetClone.RecordCount '# of records
'form has Header, ...DoCmd Code
I'm wanting to insert data, in this case and employee's name from query1,
into the text of an email. Can anyone tell me how this is done. I've
provide some sample code below. Many thanks!
DoCmd.SendObject acSendQuery, "Query1", "HTML", "John Doe", , , "Adherence", _
"The following agent (Query1.[Employee Name]) is out of adherence"
you can use DLookup() but there may be a better way depending on how you are
running this code. For example, how are you deriving the "John Doe" nam...DoCmd.HourGlass not working
I've got a form with a treeview object. When I double click on a
particular node in the treeview I open a second form. The second form
takes awhile to populate so I want to display an hourglass cursor. I
can't get the hourglass to display. What's odd is that it works from a
button click event but not the treeview double click event.
This code doesn't work:
Private Sub TreeView1_DblClick()
This code works:
Private Sub Button_Click()
How can I get the Zero to be Null or Empty or Text? CompletedDate is a Text
I thought "" or "Not updated" would get it but error's out
DoCmd.RunSQL "update tblPayrollCompletion set CompletedDate = 0"
Thanks for any help
I won't ask why you have a completed date as a text datatype, rather than a
datetime datatype. But given that it IS a text datatype, the following will
DoCmd.RunSQL "UPDATE tblPayrollCompletion SET CompletedDate = '0'"
will set CompletedDate to the text string '0'
If Me.Action = 1 Then ReportName = "Rpt_ActivationBounty_Detail"
If Me.Action = 2 Then ReportName = "Rpt_RevenueShare_Detail"
If Me.Action = 3 Then ReportName = "Rpt_ClientSummary"
If Me.Action = 4 Then ReportName = "Rpt_CheckRequisition"
If Me.Action = 5 Then ReportName = "Rpt_ItemCodes_NONVAR_AUDIT"
If Me.Action = 6 Then ReportName = "Rpt_ItemCodes_VAR_AUDIT"
DoCmd.OpenReport ReportName, acViewPreview, , "Partner_ID=" & Me.Lkp
The client selects a Partner from a drop-down list... Then selects which ...