Q. Need to know if this code is built-in to Access?

J

Jim Jones

Hi,

I created a form via a wizard, which "did its best" in laying out my
forms/subforms.

On the first form, it placed a button to open a pop up (linked form),
and this is the code behind the button, that it created:

**********************************************************
Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err

If ChildFormIsOpen() Then
CloseChildForm
Else
OpenChildForm
FilterChildForm
End If

ToggleLink_Click_Exit:
Exit Sub

ToggleLink_Click_Err:
MsgBox Error$
Resume ToggleLink_Click_Exit

End Sub
********************************************************

From that code, what does the "FilterChildForm" statement, which is
on a line by itself do?

What does it filter off of or from or to ?

If the FilterChildForm statement something it created somewhere hidden
in my database?

Thanks,
Jim
 
A

Art

Hello:
This looks like pseudo code and, as far as I know, is
not part of any Access button wizard output. I would be
the first to admit, though, that I am a long way from GURU
status.

Hope This Helps
 
C

Chris

It looks like it's calling a seperate subroutine. Select
that line, right click, and click Definition. You should
jump to that sub.


Chris
 
D

Dirk Goldgar

Jim Jones said:
Hi,

I created a form via a wizard, which "did its best" in laying out my
forms/subforms.

On the first form, it placed a button to open a pop up (linked form),
and this is the code behind the button, that it created:

**********************************************************
Sub ToggleLink_Click()
On Error GoTo ToggleLink_Click_Err

If ChildFormIsOpen() Then
CloseChildForm
Else
OpenChildForm
FilterChildForm
End If

ToggleLink_Click_Exit:
Exit Sub

ToggleLink_Click_Err:
MsgBox Error$
Resume ToggleLink_Click_Exit

End Sub
********************************************************

From that code, what does the "FilterChildForm" statement, which is
on a line by itself do?

What does it filter off of or from or to ?

If the FilterChildForm statement something it created somewhere hidden
in my database?

That's the code produced by the form wizard when you tell it to create
linked forms from two related tables, rather than a main form/subform
arrangement. The wizard creates private subroutines named
OpenChildForm, FilterChildForm, and CloseChildForm in the "master"
form, which it uses to (a) open the child form, (b) apply a filter to it
so that it show only the records related to the master form, and (b)
close the child form.
 
J

Jim Jones

Thank you all, i found it.
I didn't know about that right-click definitiion trick.

Thanks,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top