Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #21 (permalink)  
Old October 18th, 2003, 05:53 PM
Authorized User
 
Join Date: Oct 2003
Location: New York, NY, .
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....

Reply With Quote
  #22 (permalink)  
Old October 18th, 2003, 06:49 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
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

Reply With Quote
  #23 (permalink)  
Old October 18th, 2003, 09:26 PM
Authorized User
 
Join Date: Oct 2003
Location: New York, NY, .
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!
Reply With Quote
  #24 (permalink)  
Old October 18th, 2003, 09:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

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


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 10:09 AM.


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