Kevin-
That code runs only when you move to a different row in your record source. If you want to reveal the subform after you've entered something in GroupBookingID, then you need to use the AfterUpdate event of that control.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Oct 31, 2015, at 10:10 AM, 'zhaoliqingoffice@163.com' zhaoliqingoffice@163.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Dear All,
I use use "visible" to show and hide a subform, after input some data, the sub form still didn't show. Please help.
Private Sub Form_Current()
On Error GoTo ErrHandle
If IsNull(Me.GroupBookingID) Then
Forms!frmGroupBooking!subPart.Visible = False
Else
Forms!frmGroupBooking!subPart.Visible = False
Else
Forms!frmGroupBooking!subPart.Visible = True
End If
ErrExit:
Exit Sub
ErrHandle:
Resume ErrExit
End If
ErrExit:
Exit Sub
ErrHandle:
Resume ErrExit
End Sub
Best Regards,
Kevin
Regards,
Kevin Zhao
Date: 2015-10-31 16:20Subject: [MS_AccessPros] Subform didn't showDear All,I use use "visible" to show and hide a subform, after input some data, the sub form still didn't show. Please help.Private Sub Form_Current()On Error GoTo ErrHandleIf IsNull(Me.GroupBookingID) Then
Forms!frmGroupBooking!subPart.Visible = True
ElseForms!frmGroupBooking!subPart.Visible = False
End If
ErrExit:
Exit Sub
ErrHandle:
Resume ErrExitEnd SubBest Regards,Kevin
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar