Groundrush
Registered User.
- Local time
- Today, 22:16
- Joined
- Apr 14, 2002
- Messages
- 1,376
My db works well, it has been compressed/repaired & the code complied without any problems until I convert it to an Mde
The problem I have is that for some reason three of my sub forms will not function properly without getting this on click warning
I don't understand why there is a problem if it works fine without converting it to a Mde.
The 3 subforms do have one thing in common though
they have a cmd button that moves the focus to another object on the form & then the subforms visibility is set to false.
it works just fine as a normal database but for some reason it causes problems as an Mde.
any ideas?
thanks

The problem I have is that for some reason three of my sub forms will not function properly without getting this on click warning
The expression on Click you entered as the event property setting produced the following error:The expression you entered refers to an object that is closed or doesn't exist.
Visual Basic for Applications (VBA) encountered a problem while attempting to access a property or method. The problem may be one of the following:
A reference is missing.
For help restoring missing references, see the Microsoft Knowledge Base article 283806.
An Expression is misspelled.
Check all expressions used in event properties for correct spelling.
A user-defined function is declared as a sub or as a private function in a module.
Expressions can resolve a user-defined function only if the function is declared as one of the following:
- A public function in a module
- A public or private function in a code module of the current form or report
Security in Access is set to Medium or High and the Microsoft Jet 4.0 SP8 update is not installed.
A more recent verion of Jet 4.0 must be installed for Access to function properly when security is set to Medium or High. To obtain the latest version of Microsoft Jet, go to Windows Update.
I don't understand why there is a problem if it works fine without converting it to a Mde.
The 3 subforms do have one thing in common though
they have a cmd button that moves the focus to another object on the form & then the subforms visibility is set to false.
Code:
[Private Sub CmdClose_Click()
On Error GoTo 0 'Err_cmdClose_Click
If DCount("*", "tblTaskScheduleRates", "[SRLINKTask] = " & Me.Parent.TaskID) = 0 Then
Me.Parent.frmFlashRates.Visible = True
Me.Parent.cmdViewRates.Visible = True
End If
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Me.Parent.cmdSaveRecord.SetFocus
Me.Parent.frmTaskScheduleRatesSubForm.Visible = False
Me.Parent.frmTaskScheduleRatesViewSubForm!lstAssigned.Requery
Me.Parent!lstRevisedCost.Visible = True
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox Err.Description
Resume Exit_cmdClose_Click
End Sub
Code:
Private Sub CmdClose_Click()
Me.Parent.cmdAssignTask.SetFocus
Me.Parent.frmTimeRecordAssignSubForm.Visible = False
Me.Parent.frmTaskMessageViewSubForm!lstMessages.Requery
Me.Parent!frmSumTimeRecordsSubForm!lstAssigned.Requery
Me.Parent!lstRevisedCost.Visible = True
If DCount("*", "qrySubbyFlash", "[TaskID] = " & Me.Parent!TaskID) > 0 Then
Me.Parent!cboTaskStatus = Me.Parent!cboTaskStatus.ItemData(1)
Else
Me.Parent!cboTaskStatus = Me.Parent!cboTaskStatus.ItemData(0)
End If
If DCount("*", "qryOperativeFlash", "[TTLINKTask] = " & Me.Parent!TaskID) > 0 Then
Me.Parent!cboTaskStatus = Me.Parent!cboTaskStatus.ItemData(1)
End If
End Sub
Code:
Private Sub cmdSave_Click()
If DCount("*", "tblTaskMessage", "[TMLINKTask] = " & Me.Parent.TaskID) = 0 Then
Me.Parent.frmFlashMessage.Visible = True
Me.Parent.cmdViewMessages.Visible = True
End If
Me.Parent.cmdNotes.SetFocus
Me.Parent.frmTaskMessageSubForm.Visible = False
Me.Parent.frmTaskMessageViewSubForm!lstMessages.Requery
Me.Parent!lstRevisedCost.Visible = True
End Sub
it works just fine as a normal database but for some reason it causes problems as an Mde.
any ideas?
thanks