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 October 18th, 2003, 05:53 PM
Authorized User
 
Join Date: Oct 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, Bob, your aggregate function thing works in my Test Table, BUT I get an error message in my "real table" about an "Invalid use of null".

Any thoughts??
Thanks again....

 
Old October 18th, 2003, 06:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hard to say. I assume you're using the Domain Aggregate version (the first version with DMax). The Nz function is trapping for null, plus 3 of the 4 fields in the test table are using autonumber or default values. Does your "real" table already contain any Null values? Are the defaults set correctly? Are the data types and field names identical to the test table where appropriate?

If the On Current event is causing the error, you need to figure out which line of code is raising it. Open up your code module in the VB Editor and click anywhere in the line that reads 'Private Sub Form_Current()'. With your cursor in this line, press the F9 key. A reddish highlight will appear around the procedure header and you'll see a red dot in the left margin. This is called a break point. When you open your form again, code exectuion will stop on this line of code and the highlight will be yellow. You can then step through the module (slowly), line by line, by pressing the F8 key. Each line of code executes as you press the F8 key and the yellow highlighting moves to the next line of code. Hovering your mouse pointer over any variable or control names while in break mode will display an Auto Data Tip box telling you what the current value of the variable or conrol is. Check your variables and controls as you go. Do you see any Null values? Which line of code raises an error? You can remove the break point by pressing Ctrl-Shift-F9.

I'm going to go watch the Yankees loose now, but I'll check back latter.

Bob

 
Old October 18th, 2003, 09:26 PM
Authorized User
 
Join Date: Oct 2003
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bob (and Everyone else who helped out...):

Everything works PERFECTLY!! I found where my error was in coding (but thanks for the step-through on debugging!) by a bit of intuition and trial&error. The Form is working exactly as we need it to!

I bow down to your genius....

So I'm home now and I'm going to watch the Yankees WIN! (If they can get it together...;)

Thanks again everyone! You've all taught me a lot about coding (by providing sample solutions and by me going through each statement and learning what it does!). I'm sure I'll have future questions, so see ya online!

Ciao,
Scott
A very RELIEVED New York guy!
 
Old October 18th, 2003, 09:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Curses!!! Yankees WIN!?!?!?! If only I'd KNOWN!!!!!! :)







Similar Threads
Thread Thread Starter Forum Replies Last Post
JMeter: Need help Urgently motionless BOOK: Expert One-on-One J2EE Design and Development 0 February 19th, 2008 12:16 PM
Urgently Need Help humayoo Beginning PHP 2 October 16th, 2007 02:39 PM
Need Help Urgently dpkbahuguna Beginning VB 6 2 August 10th, 2006 01:29 AM
urgently need help sumeghagupta .NET Web Services 1 October 5th, 2004 11:38 PM





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