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.
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.
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.
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
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.
Here is the OnClick code that opens the report... - Private Sub cmdListActiveByTestStand_Click()
-
On Error GoTo Err_cmdListActiveByTestStand_Click
-
-
Dim stDocName As String
-
-
stDocName = "rActiveEnginesByTestStand"
-
DoCmd.OpenReport stDocName, acPreview
-
-
Exit_cmdListActiveByTestStand_Click:
-
Exit Sub
-
-
Err_cmdListActiveByTestStand_Click:
-
MsgBox Err.Description
-
Resume Exit_cmdListActiveByTestStand_Click
-
-
End Sub
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
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?
Try to use =Date() instead =Now() Sign in to post your reply or Sign up for a free account.
Similar topics
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
|
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...
|
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
|
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...
|
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...
|
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...
|
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()";...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
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
|
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...
|
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...
| |