use this in your "OnLoad" event of 3rd form:
If SysCmd(acSysCmdGetObjectState, acForm, "2nd Form Name") <> 0 Then
DoCmd.Close acForm, "2nd Form Name"
End If
Im using access2002, not sure if SysCmd is supported in all versions
why not use "On Key Down" event of the checkbox. i tried and its working:
Private Sub ChkBox_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 16 Then
MsgBox "Shift pressed"
End If
End Sub
First open the report using where condition for current record and then use SendObject for same report. This would solve your problem. Later you can close the opened record after SendObject. e.g:
DoCmd.OpenReport stDocName, acPreview, , "[ref]= Forms!Main_Form!ref"
DoCmd.SendObject...
Hi,
Can I use wild-card in the OpenForm's WhereCondition? I've tried this but doesn't work:
DoCmd.OpenForm("Form_Name", , , "First_Name = 'Alan*'")
I want the form to show all the records having "First_Name" starting with "Alan"
please help!
Thanks in advance.
Hi,
I am new to access and need some help. I have a report based on a table say "A", which contains a field called "Department" (along with other fields). Now I want to filter this field "Department" in my report based upon values stored in another table called "B". eg. department in table A...