Re: Data Changing Issue
- From: Karen <Karen@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 18 Oct 2007 11:10:02 -0700
Hi
OK, what you suggested did not work. I updated my expression to what you
indicated and re-ran all the queries (using form) and when I saw the results
on my report the numbers kept changing again.
Could it be something else?
Thanks
"Michel Walsh" wrote:
I mean that even if the table exists on the hard disk, you cannot reach it.
simply by using its name, *if* you are in VBA. In fact, in VBA, you can read
the data of your table from a recordset. Note that if you are using a Form
or a Report, you may give the name of the table as record-source (see this
property), without having to explicitly open it in VBA. Access will just
open a recordset for you, in that case. You can reach that recordset, in VBA
code behind the form, with the expression: Me.Recordset.
If you are in a query, rather than being in VBA, the table name must be in
the FROM clause.
Otherwise, the table won't be OPEN to you, even if it exists on the hard
disk.
(Sure, you can also use Access end user interface to reach your data, such
as seeing a table in data-view, as example, but your question leads me to
think you were using either VBA code, either a query.)
Vanderghast, Access MVP
"Karen" <Karen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4B467934-13C8-490C-97F0-6234B39DB1CE@xxxxxxxxxxxxxxxx
Hi Michel - Thanks for the info. To clarify (I am not an expert in
Access,
(yet))
but I understood what you said below except for
"Note that even if your table name is sm, there is no VBA-object that is
open, by default, with that name. So, in the immediate debug window, as
example,
? table1!myid
is very unlikely to print some value of myid present in table1... unless
table1 is an existing VBA object, at that moment."
Can you please clarify this?
I am verifying the data now with your suggestion on changing the
expression
within the query. Hoping the data is correct. Thanks
"Michel Walsh" wrote:
Depends where this statement is used.
If inside a query, the table sm should be part of the FROM clause (or,
graphically, in the upper half of the query designer) and the preferred
syntax is a dot, not a bang.
DateDiff("m", smf.smfwedding, WEDDINGDATE)
If in a form or in a report, then the table value should be 'bound' to a
control (can be invisible, if you prefer so), and the preferred syntax
would
be like:
DateDiff("m", Me.ControlName , WEDDINGDATE)
Note that even if your table name is sm, there is no VBA-object that is
open, by default, with that name. So, in the immediate debug window, as
example,
? table1!myid
is very unlikely to print some value of myid present in table1... unless
table1 is an existing VBA object, at that moment.
Hoping it may help,
Vanderghast, Access MVP
"Karen" <Karen@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B7439289-0B67-40CB-9AE1-DF3CC1DC0DB4@xxxxxxxxxxxxxxxx
Hi
I am running some queries using a form I created and for some strange
reason
some people are falling off and coming back to the report when I run
the
queries and then re-run them immidiately after. I am not changing any
of
my
parameters and the data is not changing in the tables I am linked to.
Can
you help?
I am using Access 2003. I have several different queries running as
make
table queries from Foxpro database linked tables. Within these queries
I
have one query that has a parameter set for "Married Date" What this
does
is
prompt the user to enter a start date and then I have an expression
that
calculates the number of months from that "start date" to an actual
"Marriage Date" field in one of the tables I am linking from foxpro.
The
expression looks like this:
DateDiff("m",[smf]![smfwedding],[WEDDINGDATE])
** WEDDINGDATE is my "start date", SMF!SMFWEDDING is a field from table
from
foxpro**
Would this be the reason data is changing like this?
Help.
Thanks
- References:
- Data Changing Issue
- From: Karen
- Re: Data Changing Issue
- From: Michel Walsh
- Re: Data Changing Issue
- From: Karen
- Re: Data Changing Issue
- From: Michel Walsh
- Data Changing Issue
- Prev by Date: Re: Results on Combo Box selection or last update
- Next by Date: RE: Reference Previous Record
- Previous by thread: Re: Data Changing Issue
- Next by thread: Re: Data Changing Issue
- Index(es):
Relevant Pages
|