Access 2003: DoCmd.OpenForm is not working for me
I know I'm missing something because it generates the following error: "Compile Error: Expected Expression"
For reference, When the button is clicked, a box appears where the user has to input a uniqe Tracking ID. If the Tracking ID does not match any in the background table, it returns an error message.
If it is correct, a dialog box opens for the Tracking ID with pertinent data. The Tracking ID's are always going to be numerical. Here's thefull code (hopefully...
Thank you for taking the time to report an issue.
What's wrong... Please write below.
DoCmd.OpenForm "frmListProcDefaults", , , "ProcName= & Me.ProcName"
Private Sub Login_Click()
Dim Password As Variant
Password = DLookup("Password", "Users", "UserID = '" & Me.txtUserID & "' ")
If Nz(Password, "") = Me.txtpassword Then
DoCmd.OpenForm "Purchase Requisition"
DoCmd.OpenForm "Purchase Order"
DoCmd.OpenForm "Supplier Information"
MsgBox "Incorrect user ID or password"
That all works fine but the OpenForm is failing me! I CAN run the code as follows:
Im relatively new to Access but have some background in VBA programming.
Currently im dealing with a relatively large Database (Access File size currently at 1GB) wich of course makes computations very slow.
Im now trying to speed things up a bit and was wondering what actually happens at the Docmd.openform command. I dont mean "The form is opened" but im wondering what happens in the background.
The problem is that some of my forms take extremely long to execute this single line, so I think there is something else happening besides the simple "form opening" task.
So if anybody knows how to deal with speed issues on docmd.openform or can explain what actually is checked/computed on this command, please answer!
Thanks in advance for all responses and excuse my english, im not a native speaker.
Private Sub Command47_Click()
DoCmd.GoToRecord , , acNewRec
DoCmd.ApplyFilter "jobs form search
If IsNull(Me.Text1) Then
MsgBox "You have not filled all boxes." & vbCrLf & _
"Do you want to continue?", vbYesNo, "Edit Visit Report"
Dim Msg As VbMsgBoxResult
If Msg = vbYes Then
Pretty self explanatory its not working when I press yes, when it should save and open "HomePage"
DoCmd.OpenForm "frmClients", , qry1
DoCmd.TransferSpreadsheet acImport, 8, TblNm, FileN, True, "A1:S65536"
DoCmd.TransferSpreadsheet acImport, 10, TblNm, FileN, True, "A1:S65536"
It does not work I have the Microsoft Excel 14.0 object library selected in the references. I know using of '10' is not working because I am still using MS Access 2003.
Is there any way I can import the 2010 format excel spreadsheet to Access 2003?
DoCmd.CopyObject "C:\iHaunt\Resources\Update.accdb", "tblParameters", acTable, "tblParameters"
DoCmd.OpenForm "frmLogin1", acNormal
DoCmd.Close acForm, Me.Name
I do not get an error when this code runs and it opens the form "frmLogin1" and closes the current form just fine. But when I go to the other database, the table is not there. Does the other database need to be open?
I've also tried this with DoCmd.TransferDatabase, and that does not work either
I know I must have to link this somehow. The forms involved are
Frm_Search (where the DoCmd.OpenForm is);Frm_Company (which is the main form which includes all the company info) and SubFrm_Warnings (which is to appear on open of the Company form should there be any warnings for that particular company.
I have attached the database and posted the relevant code below...