Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer 9    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Developer 9 Lesson 5
Ken Wykoff 
       
3 months ago
Once again, I have come to a spot where I am stuck. I have checked and rechecked the names on the Property Sheet for all the boxes on the TestTakerF and everything was working till I got to the point of getting an ID number to turn up in the TestResultID box on the top right of the form. Everything is posted in the table but that number does not appear in the box on the form. Any ideas? Attachments to follow
Ken Wykoff OP  @Reply  
       
3 months ago

Ken Wykoff OP  @Reply  
       
3 months ago

Ken Wykoff OP  @Reply  
       
3 months ago

Ken Wykoff OP  @Reply  
       
3 months ago
Also, I get no error messages or msgboxes showing up for this either.
Donald Blackwell  @Reply  
       
3 months ago
If it's highlighting the RunSQL line, then I would add a msgbox right before that to msgbox S and see what comes up. You can also try to hover over the S at the end of RunSQL to see if it shows anything
Alex Hedley  @Reply  
           
3 months ago
Let's have a look at the Form in Design View with the TestResultID selected and the Properties Sheet showing.
Alex Hedley  @Reply  
           
3 months ago
Also is that your code in the Begin Test Button Event?
Kevin Robertson  @Reply  
          
3 months ago
I would also change RunSQL S to:

CurrentDb.Execute S, dbFailOnError

This way you don't have to worry about the Warnings popping up saying you're about to Append 1 record and it will save you having to turn Warnings off and then back on again.
Ken Wykoff OP  @Reply  
       
3 months ago
Donald Donald this is the results of the MsgBox placed before the RunSQL S
Ken Wykoff OP  @Reply  
       
3 months ago

Ken Wykoff OP  @Reply  
       
3 months ago
Alex Alex this is the code for the Begin Test Button and Image to follow for the property sheet on TestResultID"

DetailsPrivate Sub BeginTestBtn_Click()

    'Make sure a valid selection has been made
    
    If IsNull(StudentCbo) Then
        MsgBox "Select a student"
        Exit Sub
    End If
    
    If IsNull(TestCbo) Then
        MsgBox "Select a Test"
        Exit Sub
    End If
    
    ' check to make sure the test has questions
    
    Dim C As Long
    
    C = Nz(DCount("*", "QuestionT", "TestID=" & TestCbo), 0)
    If C = 0 Then
        MsgBox "Test has no questions."
        Exit Sub
    End If
    
    ' Lock the combo boxes
    
    StudentCbo.Enabled = False
    DepartmentCbo.Enabled = False
    ClassCbo.Enabled = False
    TestCbo.Enabled = False
    
    ' HIDE OR DISABLE BEGIN TEST BUTTON****************
    
    'Create a record for this test intance in TestResultT
    
    Dim S As String
    S = "INSERT INTO TestResultT (TestID, StudentID, TestDateTime)" & _
        " VALUES (" & TestCbo & ", " & StudentCbo & ", #" & Now() & "#);"
    MsgBox S
    DoCmd.RunSQL S
  
    ' Look up the TestResultID that was just assigned by the SQL S statement
    TestResultID = Nz(DMax("TestResultID", "TestResultT", "TestID=" & TestCbo & _
        " AND StudentID=" & StudentCbo), 0)
    If TestResultID = 0 Then
        MsgBox "Error getting TestResultID"
        Exit Sub
    End If
    
End Sub

Ken Wykoff OP  @Reply  
       
3 months ago

Ken Wykoff OP  @Reply  
       
3 months ago
Kevin Thanks Kevin, but will that make the ID number appear in the box on the form?
Kevin Robertson  @Reply  
          
3 months ago
You have misspelled TestResultID.
Ken Wykoff OP  @Reply  
       
3 months ago
Thank you again, Kevin.  I couldn't even see that spelling error. I guess somehow I am going to have to find a way to use the zoom view on all that stuff. My sight seems to be getting worse. Sad but old age is no joke. Again Thank you.
Alex Hedley  @Reply  
           
3 months ago
One option I find handy is with dragging the Table/Query Fields onto the Form, then it should be spelled correctly
Or if you are adding textboxes yourself is to have the Table open in Design View and copy over the Field name from there.
Donald Blackwell  @Reply  
       
3 months ago
I too often have to strain sometimes to see stuff on the screen and especially in older videos or pdfs. Between getting older, working on stuff when if I'm too tired, sugar too high, or just looking at the screen too long, aside from just taking a break, sometimes, I have to use some tricks when I'm coding or proofreading.

Just some reminders of some things you can do in and out of Access.
1) In most fields, SHIFT+F2 lets you go to zoom box where you can adjust font size to be easier to read
2) If the zoom box isn't available, if the Expression Builder is available (in some fields), you can view the text there and then use the mouse wheel along with shift to zoom in or zoom out
3) Copy/paste into NotePad or another application that can zoom/resize
4) If looking at a video or pdf that is blurry even when zoomed, if you're using windows 10 or 11, it has built in Windows Snipping Tool which has a decent OCR feature that lets you press the print screen button on the keyboard and the option bar will appear at top of screen and you can select the OCR button and select the area of screen you're trying to read and it will convert it to text you can copy/paste to be able to read as above.

There are also other third party screen capture tools available also.
Alex Hedley  @Reply  
           
3 months ago
Alex Hedley  @Reply  
           
3 months ago
Kevin Robertson  @Reply  
          
3 months ago
You can also use Windows Magnifier.
Ken Wykoff OP  @Reply  
       
3 months ago
Thank all of you for the information and I will look into it all in hopes I can see it all better.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 9.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 6:57:22 AM. PLT: 0s