Using where condition on form

  • Thread starter Thread starter Vadim Rapp
  • Start date Start date
V

Vadim Rapp

RG> On adp somehow it don't work.
RG> Does someone knows whay?

Most likely because in adp you have to enclose strings in single quotes. For
example,

docmd.openform "form1",,,"name='Roy' "

If this is not the case, post here the code that does not work.


Vadim
 
it should work. I always use the Northwind ADP to double check how things
work.
This assumes the table don't need the dbo. and that the user connected has
select/update privileges.
 
Hello there

On mdb i had some forms that bound to table.

From other form i open the form on praticular record by the where condition
of the open the form action.

On adp somehow it don't work.

Does someone knows whay?

If it is one of the errors of ADP what is the solution on ADP?

any help would be useful
 
Hi Roy,

Had a bit of trouble with that myself.
First open your form in design view and in the form
properties ensure that there are no entries in the filter
property, I've noticed that if a form is saved with an
entry in the filter property that that filter seems to be
applied rather than the one parsed by the wherecondition.
Also check the ServerFilter property and ensure same.
Also check that ServerFilterByForm is set to NO

You can set some code in the form open event to test that
the wherecondition is being parsed correctly.

Private Sub Form_Open(Cancel As Integer)
If Nz(Me.Filter, "") = "" Then
MsgBox "Filter = " & Nz(Me.Filter, "")
End If
If Nz(Me.ServerFilter, "") = "" Then
MsgBox "ServerFilter = " & Nz(Me.Filter, "")
End If

End Sub

Regards Alan
 
Back
Top