473,386 Members | 1,821 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,386 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 1166
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.