This one has me stumped. I'm getting a "Type Mismatch" error on one of my forms when it's being opened. It's hapening before the forms "On Open" event, I stuck a msgbox in there to check and I'm getting the error before it opens.
The line of code that calls the form from another form is.
DoCmd.OpenForm "NonConformanceAdd",,,,acFormAdd,acDialog
I get the error, click ok, then the form opens and works exactly how it's supposed to. I even tried using
DoCmd.OpenForm "f_NonConformance_add" and setting the forms property to Dialog and Data Entry to yes but still get the same error message. grrrrrr
What I'm trying to accomplish is the following
1. Calibration of instrument is bad so I need to create a non-conformance report
2. Click on create non-conformance button
3. Non Conformance data entry form opens
4. When data entry form closes bring back autonumber or null if canceled
5. Update non-conformance number field using "me.control.value = variable"
6. If the field is still null then do nothing else
7. if the field now contains something then enable the form save button, disable undo and navigation buttons.
The realy important part is that once the non-conformance record is created the users have no choice but to save the recrod that they are working on.
Non-Conformance and Calibration are two seprate databases located on an SQL server.
Any suggestions as to what I'm doing wrong or another way to skin this cat would be appreciated.