Form Behavior Problem

  • Thread starter Thread starter Kevin H
  • Start date Start date
K

Kevin H

I have a form that was designed in 97 (many users still running 97, so I had
to design the form in 97).

Importing the form into access 2002, it errors when first loaded. Taking the
form into design view, and doing anything that forces a save action (do you
want to modify the design of??) then the form works just fine the next time
it's loaded.

Any ideas on what causes this, and what I could do to prevent the error when
importing the form??

Thanx
 
Kevin H said:
I have a form that was designed in 97 (many users still running 97, so I had
to design the form in 97).

Importing the form into access 2002, it errors when first loaded. Taking the
form into design view, and doing anything that forces a save action (do you
want to modify the design of??) then the form works just fine the next time
it's loaded.

Any ideas on what causes this, and what I could do to prevent the error when
importing the form??

*What* error (of the hundreds of thousands possible) are you actually
getting?

TC
 
TC:

The form has a Dlookup function which is dependent on the valus of a field
in the current record. Form is data entry, so there's no value when form is
loaded. Staus bar displays "calculating", text box containing the Dlookup
displays #Error (typical dlookup complaint for a bad parameter)

The INTERESTING part is, as soon as I, say, make a change to a label on the
form (not affecting the code in any way), and save the form into the 2002
database, the error goes away for good, without changing the code one bit
(at least from MY end ... is Access doing some behind-the-scenes work to
explain this??)

Thanks for any input you can give
 
So, let me see if I have this right.

The form has a textbox that uses a Dlookup call. The Dlookup uses a value in
the current record. When the form is initially opened, there >is< no current
record, so the textbox displays #Error, when the form is initially opened.

Is that correct?

Then, if you open the form in Design view, and make a change to a label (not
affecting the code in any way), then close the form, and re-open it in
normal view, "the error goes away for good".

Is that correct?

This raises the obvious question: what do you mean when you say the error
"goes away"?

- There is still no current record, but the textbox displays blank (or zero
or whatever) instead of #Error? Or,

- Now there >is< a current record immediately you open the form? Or,

- Something else?

Kevin, please be aware that we can only know what you specifically tell us
in your post. We don't know what is actually happening on your screen,
unless you actually tell us the details! In this case I still don't know
what you mean when you say the error "goes away".

And, while I am in schoolmaster mode, please don't remove the previous text
when you add your reply :-) Some of us answer many posts, & it's
impossible to remember any single conversation, unless the whole text of the
entire conversation is retained within each post.

Cheers,
TC
 
TC said:
So, let me see if I have this right.

The form has a textbox that uses a Dlookup call. The Dlookup uses a value in
the current record. When the form is initially opened, there >is< no current
record, so the textbox displays #Error, when the form is initially opened.

Is that correct?
Yes, and the status bar says "calculating"
Then, if you open the form in Design view, and make a change to a label (not
affecting the code in any way), then close the form, and re-open it in
normal view, "the error goes away for good".

Is that correct?
10-4 believe it ot don't
This raises the obvious question: what do you mean when you say the error
"goes away"?
The next time the form is loaded, the listbox is blank, until the user
provides the data that makes the dlookup complete. BEFORE the change, the
user cannot make a selection to provide the data, as the #Error and the
staus bar's calculating ... seem to be an endless loop
- There is still no current record, but the textbox displays blank (or zero
or whatever) instead of #Error?
Textbox is blank.

Or,
- Now there >is< a current record immediately you open the form? Or,

- Something else?

Kevin, please be aware that we can only know what you specifically tell us
in your post. We don't know what is actually happening on your screen,
unless you actually tell us the details! In this case I still don't know
what you mean when you say the error "goes away".

And, while I am in schoolmaster mode, please don't remove the previous text
when you add your reply :-) Some of us answer many posts, & it's
impossible to remember any single conversation, unless the whole text of the
entire conversation is retained within each post.

Cheers,
TC
Thanks. I understand your confusion with what I've said ... as it makes no
sense to me either. All I can say is that it's repeatable (same issue has
occurred with several user's databases), and that a customer running on a
different machine has also run into the issue.

As I said before ... I surmise that it has something to do with import
versus save ... its just baffling as to WHY this would happen ...

I don't know if this is noteworthy or not, but the form itself has 100
command buttons, and about 5 textboxes. (clunky, yes ... but that's the way
the customer WANTS it) The command button's caption properties are populated
from a recordset (providing named buttons to push), and the Tag property of
the same button stores the value I want written to the database when they
push it. All 100 buttons have their tab stop disabled, although they are the
first 100 items in the tab order.

Another thought ... since this was written in 97 ... possibly a DAO/ADO
version issue that gets fixed when you modify and save it in the new
database??

Thanx again:

Kevin
 
Sorry Kevin, you're losing me here.

We were talking about a textbox containing a Dlookup call, but now you say:
"The next time the form is loaded, the listbox is blank, until the user
provides the data that makes the dlookup complete."

Where did the listbox suddently come from? What do you mean by "the user
provides the data that makes the dlookup complete?"

As I understand your initial problem description, a >textbox< contains a
Dlookup call which references the current record. If the table is empty, the
textbox displays #Error because the Dlookup can not return a value. Then you
change a label (in design mode), close the form & re-open it. >Precisely
what happens to the textbox now?< >Does the form now display a current
record as soon as you open it?<

Cheers,
TC
 
Back
Top