Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '3075'. 1

Status
Not open for further replies.

TriniGal

Programmer
Sep 28, 2005
84
US
Can anyone tell me what I'm doing wrong in the following code?

Code:
Private Sub cmdOK_Click()

    With Forms("frmADD_LEAK_FORM")
        [highlight].Filter = "COMMUNITY= " & Me.COMMUNITY[/highlight]
        .FilterOn = True
    End With
    DoCmd.Close acForm, Me.Name
    
End Sub

I hightlighted where the error is occuring.
Thanks.

 
TriniGal
Does it work if you enclose Community in [ ]?

Filter = "[COMMUNITY] = " & Me.COMMUNITY

Tom
 
How are ya TriniGal . . .

. . . and this:
Code:
[blue].Filter = "COMMUNITY= [red][b]'[/b][/red]" & Me.COMMUNITY [red][b]& "'"[/b][/red][/blue]

Calvin.gif
See Ya! . . . . . .
 
AceMan1,

Thank you, that worked great. Here's a star for you.

Mind if I ask another question?

I filtered the form, how do I filter the subform to go to a specific record?

From one from (frmEdit) which has two field txtcommunity and txtLEAKID I want to go to another form (frmADD_LEAK_FORM) which has txtcommunity, and you already helped me with that and the specified txtLEAKID in the subform (frmADD_LEAK_SUBFORM).

How do I do this?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top