Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overflow error

Status
Not open for further replies.

seducedbycodes

Technical User
Jul 4, 2005
27
AU
Hi,
I'm having trouble with an overflow error with one of my forms. I am resizing a subform depending on how many records it holds each time the user goes to a new record, the size of the subform updates. I resize the Me.Detail depending on how big the subform is. I think this is where the overflow error is occuring. I also move text boxes and labels up or down depending on the size of the subform. It never happens when i first open the form, only when i go to another record using the navigation buttons. Was wondering if there was another part of the form i need to resize so that data isn't moved outside of this region?
Thanks in advance
Bec
 
Which line of code is highlighted if you choose to debug when the error raises ?
I suspect a Divide by zero problem.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Me.Detail.Height = Me.Detail.Height + Difference is highlighted where
Difference = Me.QuoteParts.Height + Me.QuoteParts.Top

i don't do any division anywhere within the code?? it's puzzling
 
And what are the values of Me.Detail.Height and Difference at that time ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
about 40000? This is just a guess, i have these values printed on the form except they do not update when the error occurs,
 
The Height property is an Integer and thus limited to 32767 max.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
eeeek...so am i supposed to make things such as Me.Detail.Height a long data type, how is this done...
Changed the difference var to long, but that wasn't the problem
 
Anyway 40000 twips =~ 27.78 inch !!
You can't have such height in a form.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top