C
CSDunn
Hello,
The following is an issue I am having with forms in an Access 2000 ADP file
that connects to a SQL Server 2000 database.
I have a form 'A' in which there is a button located in its subform 'A' that
opens another form 'B' when the subform 'A' button is clicked. The button is
designed so that form 'B' will show a single record based on a field value
from form 'A'. The name of the matching field that is present in both form
'A' and form 'B' is called 'Permnum'.
I can select record 1 in form 'A', click the button in subform 'A', and when
form 'B' opens, I get the record 1 data that I expected. The 'ServerFilter'
property in form 'B' shows [Permnum]= (record 1). It works this way until I
hit CTRL S on the keyboard while looking at the record 1 data in form 'B'.
When I do this, then go back to form 'A' and select record 2, then click the
button in subform 'A', form 'B' still shows record 1 data. If I check the
'ServerFilter' property in form 'B', it still shows [Permnum]=(record 1),
even though I selected record 2 in form 'A'.
I have tried things like 'SetValue' on the 'ServerFilter' property on
different events of form 'B', but nothing has worked. I saw the following
about 'ServerFilter' in help:
"You can only remove a server filter by using Visual Basic to set the
ServerFilterByForm property to False (0) or clear all filter criteria in the
Server Filter By Form window and then click Apply Server Filter."
So I tried this on form 'B':
Private Sub Form_Close()
Me.ServerFilterByForm = False
End Sub
But that did not work either.
What can I do to control the 'ServerFilter' property for form 'B' so that
the correct corresponding records from form 'A' will always appear, even if
the user saves form 'B'?
Thanks for your help!
CSDunn
The following is an issue I am having with forms in an Access 2000 ADP file
that connects to a SQL Server 2000 database.
I have a form 'A' in which there is a button located in its subform 'A' that
opens another form 'B' when the subform 'A' button is clicked. The button is
designed so that form 'B' will show a single record based on a field value
from form 'A'. The name of the matching field that is present in both form
'A' and form 'B' is called 'Permnum'.
I can select record 1 in form 'A', click the button in subform 'A', and when
form 'B' opens, I get the record 1 data that I expected. The 'ServerFilter'
property in form 'B' shows [Permnum]= (record 1). It works this way until I
hit CTRL S on the keyboard while looking at the record 1 data in form 'B'.
When I do this, then go back to form 'A' and select record 2, then click the
button in subform 'A', form 'B' still shows record 1 data. If I check the
'ServerFilter' property in form 'B', it still shows [Permnum]=(record 1),
even though I selected record 2 in form 'A'.
I have tried things like 'SetValue' on the 'ServerFilter' property on
different events of form 'B', but nothing has worked. I saw the following
about 'ServerFilter' in help:
"You can only remove a server filter by using Visual Basic to set the
ServerFilterByForm property to False (0) or clear all filter criteria in the
Server Filter By Form window and then click Apply Server Filter."
So I tried this on form 'B':
Private Sub Form_Close()
Me.ServerFilterByForm = False
End Sub
But that did not work either.
What can I do to control the 'ServerFilter' property for form 'B' so that
the correct corresponding records from form 'A' will always appear, even if
the user saves form 'B'?
Thanks for your help!
CSDunn