Durane,
All right. Thanks.
I have another problem I need your help.
My database imports data from excel files. Because the size of the files,
the importing could run for 10 minutes. The process brings records one at a
time into the database table. (Because the way excel decides the data type
based on first several rows, I don't use transferspreadsheet method to avoid
trouble of losing data or messages such as Numeric Field Overflow. I also
don't like using transfrespreadsheet method because Access can't close Excel
after running transferspreadsheet. To be able to close the excel, I have to
save formatted excel file, close it and then do transferspreadsheet. The
problem with it is this will change the orignial excel file. In a word,
communication with excel could be so much headache. If you have suggestions
to work around all these troubles, I would love to hear them.)
Anyway, this importing is once a month thing, so my boss doesn't quite mind
about it. And my way pulls in most exact data.
My problem is everytime when I am testing the importing, if an end user
happens to work on the database at the same time, even if he is working on a
form that is based on an unrelated table, he sees the message like "Currently
locked, unable to modify." I wonder why this happens and how to solve the
issue.
This is a split-into-font-and-back-end database.
Thanks.
Lydia
--
Access/VB Programmer
Duane Hookom said:
I can't tell you exactly "why" but I expect running the report with records
requires the resolution of all parameters for every record. If there are no
records to print, the parameter ([Enter a MIS number]) doesn't need to be
resolved.
--
Duane Hookom
Microsoft Access MVP
Lydia said:
Duane,
Thanks. It works.
Although it is the same amount of work in creating a data entry form and a
table, I prefer the form to keep the report clean.
My only puzzle is why Access stops the prompt when there is no record in the
report.
Lydia
--
Access/VB Programmer
:
You won't get prompted unless there are records (as you have found). You
should be using references to controls on forms rather than parameter prompts.
--
Duane Hookom
Microsoft Access MVP
:
Duane,
I don't know how to post a new question specifically addressed to you so I
find a message by you and did a reply instead.
This is my question:
I have a text box with its control source set to =[Enter a MIS number] &"
MIS number" and this text box is on a chart report with several subreports on
it.
When the parent report has nothing in its record source(It is an unbound
report), when I open the report, I don't see prompt for [Enter a Mis
Number]. However if I put a table to the report's record source, the prompt
comes up all right. I want the report to stay as it is: an unbound report.
My current work around is to create a table with one record and set it to
the report's recordsource.
Do you have any suggestion why this happens and is there is a better way to
deal with it?
Thanks.
--
Access/VB Programmer
:
I would start by opening a form with the controls for setting the criteria.
Your subreport Record Source would need something in it SQL like:
WHERE [SomeField] = Forms!frmCriteria!cboMyCombo
You can set the Where Condition of the DoCmd.OpenReport method to set the
filter for your main report.
--
Duane Hookom
Microsoft Access MVP
:
I have rpt1 based on qry1.
rpt1 has sub-rpt1. sub-rpt1 is based on qry2.
qry1 and qry2 both have a filter. The two filters are different.
My question - how do I set up a prompt form to launch the report with the
filters applied? I understand the basics of coding a WHERE clause and
passing it to the query via OpenArgs for a single report. But with a
subreport added, it’s too complex for me.
I have Access 2003 and Windows xp.