473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to refresh a field automatically?

Hi All,

I have a form which has a field named VendorID it gets data from the following query

SELECT TOP 2 V.VendorID, V.VendorName, COUNT(A.ClaimNumber) AS Total_assignment, V.VendorStatus
FROM dbo.VendorMaster V LEFT OUTER JOIN
dbo.VendorAssignment A ON V.VendorID = A.VendorID
GROUP BY V.VendorID, V.VendorName, V.VendorStatus
HAVING (V.VendorStatus = N'Active')
ORDER BY COUNT(A.ClaimNumber)

So, if we look at the code it should give me top 2 by ascending , but whats happening here is once i refresh it gives me top 2 and it stays the same until and unless i go to view mode and come back to the form mode( refresh) again. Can someone please help me with the automatic code or something which can make this one update automatically?

Thanks a lot for your help.
Feb 25 '15 #1
1 1167
jforbes
1,107 Expert 1GB
What kind of field is this? If it is a ListBox, a .Refresh wont cut it. You'll need to use a .Requery.

.Refresh only requeries the .RecordSource of the Form. A .Requery can requery the .RowSource of a Control.

This might be more clear than what I have typed (then again it might not):
http://support.microsoft.com/kb/209634
Feb 27 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Xerxes | last post by:
Hi, can I have a field automatically clicked by calling something like click()? I have a dropdown box, one of whose elements is "Others (Please Specify)". I list the dropdown boxes values...
1
by: Curtis | last post by:
I am having a problem with the coding below that someone was trying to help me with in another website. I have been to several websites and hopefully here I can get it resolved. I inherited this...
10
by: RoadRunner | last post by:
Hi, I have a employee vacation database that has a vacation table that has the employee name, pay week and date of vacation. I have another lookup table with pay week code and date range for the...
1
by: marksjy | last post by:
I have a small database with a primary key similar to a social security number (SSN). The tables are tied to the primary table via the SSN-type field with referential integrity. I have a number...
2
by: suhaime | last post by:
Hi there... This is my first time asking the question here so bear with me... I have two tables.. 1. Products 2. OrderDetails The fields in Products are as follows
2
by: wongray | last post by:
Hello Again. I have another question. I have a database where I have a combo list and If I want to add a new record in the combo list, and the data will not refresh until I go to the toolbar ...
2
by: YouPoP | last post by:
Hi, I have a Window Form to which i added a datagridview. The binding source is working well, but does not update if the database is modified outside the application (i mean not showing the...
2
by: Bob Alston | last post by:
I have a form that is longer than the screen size, so there is a scroll bar to the right of the form. Inside the form there is a memo field that is longer than the height of the screen. It...
3
by: sheelanv | last post by:
Hi, I have two fields in my Table - "ID" and "LastUpdate" and i want the "LastUpdate" field to be updated with the current date and time whenever i make any changes to the field "ID" or add a new...
8
by: Mr Key | last post by:
Hi @1! I have a single DETAILS table from which I want to enter data including FirstNames and Surnames, But this surname field is also included in all ten other tables, I want all these tables...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.