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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Filter
hi I want to filter records in my database,

I know what I want to do, I want to filter by form. I can however only find 2 buttons that will filter in the wizard. One is apply and one is edit. The edit code is posted below, can someone ammend it so that when I click the button, it gives me the option to filter by form!!

Private Sub Command305_Click()
On Error GoTo Err_Command305_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, 0, 2, acMenuVer70

Exit_Command305_Click:
Exit Sub

Err_Command305_Click:
MsgBox Err.Description
Resume Exit_Command305_Click

End Sub




Thanks guys
 
Private Sub Command305_Click()
On Error GoTo Err_Command305_Click


DoCmd.runcommand accmdfilterbyform
Exit_Command305_Click:
Exit Sub

Err_Command305_Click:
MsgBox Err.Description
Resume Exit_Command305_Click

End Sub




 
haha, thanx yeah i'd worked it out by the time ur reply had been posted.

Problem now is that I want a apply filter button to be on my form too. However when I filter by form I can no longer press the apply filter button.

Any ideas?

Dan
 
IF you right click it is there.
Why reinvent the wheel?
 
Afternoon,

With regards to your recent comments gol4, what if the application is 'run-time' only? Then right-clicking on the relevant form no-longer applies.

Any suggestions, please?

Many thanX

Magnetar [cry]
 
Magnetar,
At no point did Dan say he was working with a run time only version. If that is your case I suggest you look at creating your own form then build the criteria based on what is put in the fields. There are several example posted on this forum. Review the FAQ and keyword search to locate them
 
Afternoon,

Thank you for your reply. However, maybe you misunderstood me. I did read Dan's comments and understood okay.

I was/am asking for suggestions (in general) as to the best way to proceed if one's user has only access to a 'run-time' version of application.
I simply drew on comments mentioned by Dan regarding filters, as well as yours ("If you right click it is there"), as an example.

Anyway thanks for your help & time.


Magnetar [spin2]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top