extracting IF

F

fred

hi,
Does anyne know how to compile a report based on whether
an entry has been made or not.
I need to search through my database and base my report on
whether any changes have been made that day, then as part
of the same query, i need to do the same but with the
unchanged items.
Any help appreciated!!!
Many thanks
 
R

RobFMS

Fred

Have you considered putting a date/time field in your record?
Have the default value be set to: =Now() in the table design.
Whenever you add a new record, the date/time stamp will be added to the
field.

Base your query on the date/time stamp for the day (or hour) you are
interested in.

HTH

--

Rob

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Need to launch your application in the appropriate version of Access?
http://www.fmsinc.com/Products/startup/index.asp

Need software tools for Access, VB, SQL or .NET?
http://www.fmsinc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
W

Wayne Morgan

You would need to time stamp the changes in the records. To do this, you would need to add
a Date/Time field and set the value of this field in a (hidden) textbox on the form that
is bound to this field. You would set the value of this textbox in the Form's BeforeUpdate
event. Once you have the time stamp, you can use this as a parameter in your query to
limit which records are returned.
 
W

Wayne Morgan

You shouldn't need to have the macro do the search, the parameters in the query should do
that for you. I haven't dealt much with macros, I usually use VBA. One of the easiest ways
to do this is to have the report pop-up a form using the acDialog window mode in the
report's OnOpen event. This form would have the items you want the user to be able to
select. When the user makes their selection, you would hide the form (set its Visible
property to No) and the code will continue in the report. The query could refer to the
values on the form in its parameter statement. To do this, you would put in the path to
the associated control on the form instead of hard coding a value into the parameter.
(i.e. =Forms!frmMyPopup!txtMyTextbox).

Yes, you can export the results of the query to an Excel spreadsheet.

Example:
DoCmd.TransferSpreadsheet acExport,acSpreadsheetTypeExcel9,"qryMyQuery","c:\test.xls",True
 
F

fred

-----Original Message-----
You shouldn't need to have the macro do the search, the
parameters in the query should do
that for you. I haven't dealt much with macros, I usually
use VBA. One of the easiest ways
to do this is to have the report pop-up a form using the acDialog window mode in the
report's OnOpen event. This form would have the items you want the user to be able to
select. When the user makes their selection, you would hide the form (set its Visible
property to No) and the code will continue in the report. The query could refer to the
values on the form in its parameter statement. To do
this, you would put in the path to
 
W

Wayne Morgan

Lots of quoting, but no new statements. It appears the message was sent too soon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top