CurrentProject is an object that was added in Access 2000 to refer to the database/project from which the VBA code is being run. It didn't exist in Access 97. According to Microsoft, the closest replacement in Access 97 is CurrentDb.
You can find more (similar) information here...
RecordCount will return -1 when ADO can't determine the number of records due to the provider or cursortype. If the tables you are selecting from reside in the same database as the form you're running the procedure from, CurrentProject.Connection should work. Try specifying the cursortype for...
"Cannot Lock File" occurs when the user doesn't have write permissions in the folder the mdb resides. The user has to have write permission in order to create the ldb file used by Access for locking. The ldb file has to be created for shared use of the mdb.
You could use the OpenArgs parameter for the form. When you open the form, use something like:
DoCmd.OpenForm "frmMyForm", acNormal, , , , , myVariable
Then you would have to check for the OpenArgs parameter in the Open event for frmMyForm and handle it as necessary.
Example:
If...
Make sure you have the group header section enabled for the day grouping, then go into the properties for that header section. One of the properties you can set should be "New Row Or Column". Set this to "After Section" and it will make each new group into a separate column.
By placing the SendObject command in the Activate Event, you're actually opening the report again before the first report becomes visible.
One possible workaround to prevent the report from being sent twice is to insert a counter to identify how many times the report is opened. If the report...
Microsoft has made a utility called "LDBView" specifically for the purpose of looking at the contents of an LDB file. The LDBView executable is part of the JetUtils download. Check the Microsoft Knowledgebase Article 176670, or search for Jetutils on the Microsoft website. (The...
After the command to open the report, insert:
DoCmd.SelectObject acReport, "contact_general_info", False
This selects the report as the active object.
I believe the single character wildcard is "_" (underscore), but I'm not certain about that. The note I made to myself says that ADO conforms to the SQL-92 standard, so anything you use for SQL (not Jet SQL) should work.
Sorry, I realized after posting that I might not have been clear. Use this as your SQL statement:
"SELECT * FROM tblTransmittal WHERE [fldstrTransmittalIdentifier] like '" & strFuncIdentifierDate & strFuncIdentifierType & "%';"
I spent several hours battling the same...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.