473,385 Members | 1,846 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,385 software developers and data experts.

What to enter in control source to show current data?

Daniel B
I have a report thats purpose is to display only current data. As of now the control source for the text box is... =Now() ...

However, when the report is run it still brings up data that is not current. What can I enter in the control source for this text box to only display current data?

Any help is much appreciated!

Daniel B.
Jan 3 '12 #1
8 1738
NeoPa
32,556 Expert Mod 16PB
=Now() will show the current date and time. If this is not what you're referring to when you say 'current data' then your question is very misleading as you fail even to introduce this concept in your question. To describe this omission as an oversight would be extreme understatement, even for the English.
Jan 3 '12 #2
Okay, well instead of acting all superior do you have any other ideas of what my problem could be then, because for some reason noncurrent data still shows up in the report.
Jan 3 '12 #3
Stewart Ross
2,545 Expert Mod 2GB
Daniel, instead of making remarks which might get your post deleted I'd suggest you post the on-click code which I presume is opening your report as it is impossible to tell what might or might not be going on without it. Presumably again the report is being opened with a filter based on your textbox value - but until we see the OpenReport statement we're just guessing.

-Stewart
Jan 3 '12 #4
NeoPa
32,556 Expert Mod 16PB
Daniel:
do you have any other ideas of what my problem could be then
Absolutely. You haven't included enough information when posting your question. Quite an obvious, and easily avoided, problem I should think. When you've rectified that (I assume you realise that's not something we can really do for you) then we can start to help.
Jan 3 '12 #5
Here is the OnClick code that opens the report...

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdListActiveByTestStand_Click()
  2. On Error GoTo Err_cmdListActiveByTestStand_Click
  3.  
  4.     Dim stDocName As String
  5.  
  6.     stDocName = "rActiveEnginesByTestStand"
  7.     DoCmd.OpenReport stDocName, acPreview
  8.  
  9. Exit_cmdListActiveByTestStand_Click:
  10.     Exit Sub
  11.  
  12. Err_cmdListActiveByTestStand_Click:
  13.     MsgBox Err.Description
  14.     Resume Exit_cmdListActiveByTestStand_Click
  15.  
  16. End Sub
Jan 3 '12 #6
Stewart Ross
2,545 Expert Mod 2GB
OK, what you have posted shows that the report is opened with no filter applied from the OpenReport method. This means one of two things: either the query underlying the report has a Where clause which refers to the textbox you mention in post #1, or there is no filter being applied to the report at all.

Please post the SQL for the query underlying your report, which should clear up the issue of whether or not there is any actual filtration being applied.

-Stewart
Jan 3 '12 #7
NeoPa
32,556 Expert Mod 16PB
OK. In no way does your code explain what you mean when you use a term like 'current data' in your question. Nor does it explain what the control referred to in your question simply as 'the text box' is supposed to be doing for you. I would guess that it may be an attempt at filtering, but as Stewart points out, the code you've shown doesn't support that idea. Why not actually ask the question sensibly, providing the information that is necessary for it to make sense?
Jan 3 '12 #8
Mihail
759 512MB
Try to use =Date() instead =Now()
Jan 4 '12 #9

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

Similar topics

9
by: Jack | last post by:
In the control source of a textbox, is there a way to refer to a column of a combobox? For example: =.Column(2) Thanks, Jack
1
by: Bart Lateur | last post by:
In an Access form, I'd like to show the status on whether an item as entered in a textbox (and thus in its coupled record field) exists in a list in another table. I've tried: - Making the...
2
by: jerry.ranch | last post by:
I've been using row source with the QBE for my list and combo boxes..when would I use control source? jerry
1
by: deluded.soul | last post by:
Hi everyone, I have a report that has a text box and the text box simply shows the sum of the amount field in the report. So, the control source is simple = SUM(Amount). The problem is that...
22
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is...
11
lee123
by: lee123 | last post by:
Hi there i have a form that i need help on, Maybe someone can help me. on this form I have three txtboxes one is (the currect date),(orderdate),(duedate) the orderdate has the date the order was...
6
by: colin spalding | last post by:
Access 2003 I subform which lists financial transactions for a client in the main form, which i total in a textbox named "txtTotalPremium" in the subform footer with the Control Source "=Sum()";...
1
by: Mike TI | last post by:
April 25, 2008 Hi all (VB Net 2008) I am populating a grid through a dataset. Now in a multiuser environment how do I show records added and updated by others. Do I have to fill the grid...
15
beacon
by: beacon | last post by:
Hi everybody, Using Access 2003. I'm trying to dynamically set the record source for the current form and set the control source for a text box to input data to one of three tables. I have a...
4
doma23
by: doma23 | last post by:
Hi, I have 4 controls, 3 text and 1 combo: txtNumber1, txtNumber2, cboCalcOption, txtSum. cboCaclOption has two possible value: "calculated" and "stated". txtSum in the control source has the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...

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.