Reload a form (1 Viewer)

JoseO

Registered User.
Local time
Today, 01:43
Joined
Jul 14, 2013
Messages
72
Hi there -

This is probably a pretty silly question but is there a way to reload a form and have it show all records? Sort of like when you first open the form? Requery and Refresh do not work and outside of using the DoCmd.Close, "FormName" first and then DoCmd.OpenForm "FormName" I have not found another way. I'm sure there is something very simple - :banghead:

What I have is a form that contains a couple of comboboxes that act as filters. They work great. So once I run my filters, I know that I am viewing, say, records 1 - 23 of 100. So again, I am just looking to show all records by using a command button rather than doing the close/open form thing. :confused:

Thank you so very much!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:43
Joined
Aug 30, 2003
Messages
36,133
What's the code you're using to filter? If you're actually setting the filter, try

Me.Filter = ""
Me.FilterOn = False
 

JoseO

Registered User.
Local time
Today, 01:43
Joined
Jul 14, 2013
Messages
72
Thank you for the fast reply pbaldy! I appreciate it. :)

Actually, I am using a SQL statement. Which is interesting because, when I don't get any hits, the "Detail" section of my form goes completely blank.

It's a music db so when I want to pull a song, the comboboxes list the artist name, song speed and song type. So my SQL statement uses SELECT, WHERE and LIKE clauses.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:43
Joined
Aug 30, 2003
Messages
36,133
Then you'd reset it to an SQL statement without a WHERE clause. A form will go blank when its source doesn't have any records and it doesn't allow new records. You can test first if you want to avoid it.
 

JoseO

Registered User.
Local time
Today, 01:43
Joined
Jul 14, 2013
Messages
72
**YOU ARE AWESOME PBALDY!!** Worked like a charm - bookmarked your website! Thank you! Thank you!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 23:43
Joined
Aug 30, 2003
Messages
36,133
Happy to help!
 

Users who are viewing this thread

Top Bottom