Sluggish Refresh (1 Viewer)

Darrell

Registered User.
Local time
Today, 20:26
Joined
Feb 1, 2001
Messages
196
After trolling through the forums for some time, I haven't been able to find a solution to this problem so...

I have a form that has several dlookups and calculations based on them for a product costing generator. When the user has finished inputing data, they click a button which refreshes the form and displays the selling price of the product.

What I have noticed though, is that sometimes when I open the form, the cell is displaying #error and I have to click the button to refresh to display the price again.

Also, sometimes when I click the button it refreshes this cell but sometimes it doesn't and I get the #error again. I may have to click this button a couple of times before it refreshes properly.

Anyone have an idea why this is happening?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:26
Joined
Feb 19, 2002
Messages
29,498
I would get rid of the DLookup()s. You can probably replace them by simply basing the form on a query that joins to the lookup data.
 

Darrell

Registered User.
Local time
Today, 20:26
Joined
Feb 1, 2001
Messages
196
Thanks for you reply Pat, it did confuse me a bit though. I am using the form to input data into a table and do not know how to do that if it is based on a query instead.

Normally I would do all of the referencing in a query and have a report based on this, however, this application is for our sales team to use in the field and therefore they need to see it update in the form when they change the input parameters.

I think that confuses me the most is that this works most of the time. I can deal with things that either do or don't work but things that mostly work stump me completely

:)

dh
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 15:26
Joined
Feb 19, 2002
Messages
29,498
Queries and tables can be used interchangeably for most purposes. Therefore, you can use a query as the recordsource for your form. If you'll tell us what the DLookup()s are doing, we may be able to offer specific alternatives.
 

Darrell

Registered User.
Local time
Today, 20:26
Joined
Feb 1, 2001
Messages
196
The user is inputing data such as product type, shape, colour, raw material type, dimensions, annual sales qty, gross margin etc.

Based on this input, the form then uses several calculations to determine which machine to produce the product on, and what gauge of material to produce it from.

The dlookups then reference other tables for the machine and material gauge and return a whole heap of other information required to generate a product costing.

dh
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom