Since a Label cannot be Active you will need to reference the controls in the OnClick event
Example
Private Sub MyLabel_Click()
Dim MyObject as Object
Set MyObject=Me.[MyLabel ]
Debug.Print myObject.Name
Debug.Print myObject.Caption
End Sub
This is because you will know what...
Rob,
What are you trying to do? Are you trying to import the table into the originally opened database or are you trying to export/import a table in the newly opened database?
You could also disable it using the Tools, StartUp menu option. Choosing Advance and then Unchecking the Use Special Keys.
However this disables the Database Window (F11), the Intermediate window and code window function keys also.
Strings (Text)
Me.RecordsetClone.FindFirst "PollIdField = '" & SearchStock & "'"
Numbers
Me.RecordsetClone.FindFirst "PollIdField = " & SearchStock
The single quotes tell the code that this is a String Value. You want to search a numeric value so you need to leave the quotes off.
You are currently using an INNER Join between tables. This will only Display records that the Joins Match.
You will need to use a LEFT/RIGHT Join. This will display all of the records in the PERSONS table and only matching records from the Department table. Of couse where there are no...
If you use VBA to import you could trap for Errors and roll back the import.
I find the Safest way to do this is to Leave the original table as is.
Import the new table (now named tbl_OpenJobs1)
Verify that it is correctly imported
Delete Old table
Rename new table
Here is just one sample already in this forum. There are many others.
http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=9373&highlight=Autonumber
to make sure you are getting the next valid autonumber you will need to save the record. You can get the ID by adding code to the After_Insert Event of the Form.
Sounds like your form has code that sets the focus to Main Menu when it closes.
One trick is to make the Forms Visible Property = False and then close it using the Docmd to close the form when the Report is Closed (Report_Close Event). This will allow the forms set focus code to work and make...
Richard,
Not all of the code is usless only the code that uses intrensic access commands (Such as Docmds). DoCmds are Access Menu commands (Meaning if there is a menu Item to do it then there is a DoCmd)
For your exporting to an Excel file you will need to look into alternatives. Such as the...
Take out the "Let"
(I appoligize I didn't see it the first time I read your post)
If Form!SCHDATE = DateValue(Form!SchdateParm) Then ScheduleLetter1 = Date