Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 18th, 2005, 08:16 PM
Authorized User
 
Join Date: Aug 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default #ERROR

How do I block #ERROR from appearing?

 
Old September 18th, 2005, 10:49 PM
Authorized User
 
Join Date: Aug 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What happens is that I have to text boxes, one that looks up a price and the other multiplies the first text box by a given SQF value. When the first one doesn't finds that prices it displays "Not Posible", that is how it should work. But when the second text box does the multiplication it shows #ERROR, I want to hide this error or convert it to Null.

 
Old September 18th, 2005, 10:58 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

In your calculation for the second.box, put it inside a Nz function. This will convert any null values to a zero.

let me know if you need more information,

Mike

Mike
EchoVue.com
 
Old September 19th, 2005, 08:39 AM
Authorized User
 
Join Date: Aug 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried this

=Nz([txtSQF]*[txtCarvingPrice],0)

but didn't worked


By the way is there a button were I could reset (not turn values to 0) all the text boxes to their default values?

 
Old September 19th, 2005, 08:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

What about trying =(Nz([txtSQF])*Nz([txtCarvingPrice]))

As for reseting the values. It depends on if your controls are bound to database fields. Try a button with "Me.Requery" for the code.

Hope That helps,

Mike

Mike
EchoVue.com
 
Old September 19th, 2005, 04:41 PM
Authorized User
 
Join Date: Aug 2005
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks

but none worked for me

my controls are all liked to its apropiate table, but what do you mean to enter it as the code?

 
Old September 19th, 2005, 06:47 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Are you familiar with VBA (Visual Basic for Applications) at all?

What you can do with your controls, is go into the events tab, select an event like 'On Click' and the Choose the code editor, and write some code to perform when the event happens. You could use this to calculate the final amount in the text box, and to return the fields to their default values.

On the topic of default values - Are you wanting to add a new record?

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.