View Single Post
Old 05-29-2017, 02:56 AM   #5
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,327
Thanks: 112
Thanked 2,837 Times in 2,587 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Button to refresh or reload form

Sometimes you do have to specify items separately e.g. use one or more of the following

Code:
'form/subform
Me.Requery
Me.subformName.Requery 

'combo boxes
Me.combobox1=""
Me.combobox2=""

'listboxes
Me.listbox = Null
Me.listbox.Requery

'multiselect listboxes
For Each varItem In Me.Listbox.ItemsSelected
        Me.Listbox.Items.Selected(varItem) = False
    Next varItem

'or ....
For I = 0 To Me.Listbox.ListCount - 1
        Me.Listbox..Selected(I) = False
Next
If all else fails then do close & reopen the form but use Application.Echo to stop screen updating until its complete

Code:
Application.Echo False
DoCmd.Close 
DoCmd.OpenForm "FormName"
Application.Echo True
That way you won't even notice the reloading & its quick
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
isladogs is offline   Reply With Quote
The Following 3 Users Say Thank You to isladogs For This Useful Post:
andredrinkwater (10-03-2019), opopanax666 (05-30-2018), psyc0tic1 (08-13-2018)