473,612 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to repaint a form with a new filter

Bob
Trying to repaint a form named fcon using a new filter:

'Repaint the form with the new data
Forms!fcon.Filt erOn = False
Forms!fcon.Filt er = "RecNo = " & currecno & " AND Currentvalue = -1"
Forms!fcon.Filt erOn = True
Forms!fcon.Requ ery

Stop

DoCmd.Minimize

DoCmd.Restore
Stop
Me.Repaint
Stop
the immediately preceding code changes the source for the form, a
query. It appears that the filter statement and values are correct.
However the form never repaints.
Suggestions?

Bob
bobalston9 at AOL dot com

Nov 13 '05 #1
4 1898
Maybe try I think:
DoCmd.RunComman d acCmdRefresh

The last couple weeks though, my experience is that filters in access
are querky. I'm going to try to figure out how to generate queries
dynamically instead.

Nov 13 '05 #2
Bob
Will try that. One thing I found is that it works correctly if I do
not use the auto start of the startup form. If I startup the same
form, it works.

Go figure!

Bob

Nov 13 '05 #3
Bob
DoCmd.RunComman d acCmdRefresh

did not help.
But it did point out that apparently there is a subform. so maybe it
needs a record source refreshed.

Bob

Nov 13 '05 #4
Bob
I have a workaround. If I open the database but leave the database
window visible it works fine. If I change that one startup parm, it
fails.

I would guess it is due to the record source of the subforms and likely
the need to requery them.

Go figure.

Bob

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5132
by: Joe A | last post by:
I'm using Access 2002 on Windows XP PC, 500 megs ram, Front end/back end app. I have a simple form that draws a thermometer to indicate progress of code that is running. The thermometer form sometimes stops advancing (does not repaint) part way thru it's cycle. If you click the MS Access window title bar during the cycle, the Access title bar switches to Access Not Responding. But if I ctrl+Break to stop the code it is indeed still...
2
11065
by: Randy | last post by:
Hello, I've got a form which has a Print button on it. When clicked, this Print button invokes the Print Priview dialog. All this works fine. The problem I'm having is that on some computers, after the Print Preview dialog is closed, the originating form doesn't repaint and the area under the Print Preview is garbled. How should this be handled? I'm not seeing how to force this originating form to do a repaint? Thanks
4
4450
by: MLH | last post by:
Setting form's Picture property to another file from within VBA doesn't repaint the form with new bitmap - for instance... Me.Picture = "c:\pics\MyNewPic.jpg" I tried Me.Repaint afterward, to no avail. Ideas? Suggestions?
2
10134
by: aaron.kempf | last post by:
hey guys i have an ETL winform in VB 2005 and it's like-- off in la-la land. i know it's doing things-- it's happily crunching away. but i'm confused about what i need to do to make the main form refresh... or repaint.. it's like.. it just looks hung (sorta like me lol jk) and i just want something that LOOKS AND ACTS like a real app.
2
5914
by: Henrootje | last post by:
Hello there! I have a piece of code in a module (function) that constructs a filter. But now I run into a problem..... It seems that I can only set a filter form a module if I open the form in design mode.............. (that is, if changing the filter from a module / called function) But that means any other changes I made on the form (such as f..e. the
5
2067
by: DeanL | last post by:
Hi all, I'm trying to set up a query that runs from a command button on a form (simple enough so far), what I want the query to do is take values from the fields on the form (seven fields in total) but sometimes not all the fields will be filled. If a field is empty then the assumption is that no filter will be applied to that field in the query and should return all results within the limits of the other field in the query.
3
5722
by: gmazza via AccessMonster.com | last post by:
Hi there, I am trying to run a report using a parameter for where the user chooses a month from a combo box. Then on the report, I want it to compare the month to a date field and choose only those dates with the month chosen from the parameter form. Basically, its to see who's birthdays are coming up. So on the parameter form you choose November, so then I want the report to display all the kids who's birthdays are in November. Any help...
15
2582
by: Briansmi1116 | last post by:
I created two buttons, that filter my form, They filter in different Fields, and if one is filtered, and the other is not there is a certain amount of record, if they are both pushed, then there is less. This works great, but now I want to filter within what is left in the form, without adding the other records. The code I use to filter using my buttons is: Private Sub filter_closed_Click() If filter_closed.Caption = "Filter Closed"...
9
1841
by: sparks | last post by:
Right now I had to build a report that allowed the people to check for gross outliers in their data input. short I am looking at 2.5* std dev + - anyway I used 2 dummy variables in the query the report is tied to. start date and end date. This pops up an input box for these values and they put in 11/01/08 and 11/31/08 and it runs the report showing the outliers. I watched and everyone is looking at month not date Now I was thinking...
0
8105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8605
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8565
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6076
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5532
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4109
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1413
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.