Page 5 of 6 FirstFirst 123456 LastLast
Results 61 to 75 of 88
  1. #61
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Actually, I think I fixed that issue now. Now I'm going to create a procedure for the frmContract form. I will post the entire lab later on tonight so you can review it so hopefully you could respond back to me tonight.

  2. #62
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Ok, for the frmContract form, I got stuck and I know the code is incorrect but here is what I got:

    Option Compare Database


    Private Sub Form_Current()
    'For older contracts, display a message and the LessonType field value in bold, blue text
    'For all other contracts, display the LessonType field value in black without a message
    If LessonType = #Value# Then
    lblNoInstr.Visible = True
    LessonType.ForeColor =
    Else
    lblNoInstr.Visible = False
    LessonType.ForeColor =
    End If
    End Sub

    So what will be the correct way to write this procedure out? If you need reference, here is the link to the assignment I'm working on again, its Case Problem 1 page 606
    http://books.google.com/books?id=udW...onvert&f=false

  3. #63
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Code:
       If LessonType = "Voice" Then
            lblNoInstr.Visible = True
            LessonType.ForeColor = vbBlue
            LessonType.FontBold = True
       Else
            lblNoInstr.Visible = False
            LessonType.ForeColor = vbBlack
            LessonType.FontBold = False
       End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #64
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Ok here is the final version of Lab 11, can you check it to see if everything is correct? Thanks and hope to hear from you shortly. Here is the lab below:
    Attached Files Attached Files

  5. #65
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I prefer you to analyze your work and identify specific issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #66
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Well for the frmContract, I see the No Instrument text next to the LessonType box and the text is blue and bold. However, I could enter anything in the LessonType box and it always comes out blue and bold and the No Instrument message doesn't disappear when its needed. That is the problem I'm having.

  7. #67
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    The code is in the form Current event and only executes when navigating records.

    If you want the code to execute when enter value into LessonType textbox then also need it in the textbox AfterUpdate event.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #68
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Oh man, I entered the code into the AfterUpdate textbox, but any text I enter into the LessonType box is just regular black font. I got ridof the code in the form Current, but nothing is improving. That's odd. Why is it still not working then?

  9. #69
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Okay, I got it to work now for the LessonType box. Now I will work on Lab 12.

  10. #70
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Ok in this lab I need to create a query named qryInstrumentSubquery that contains the following fields, iin order, frm the tblContract table: LessonType, StudentID, ContractStartDate, ContractEndDate, and MonthlyRentalCost. So for this part, do I just make it a Simple Query? If I did that, I would not get the option box to allow me to sort in ascending order, so that is why I was wondering what kind of query do I use to create this. Later on it says to select only those records with a MonthlyRentalCost value not equal to zero (I don't know how to do that, do I go to the Properties sheet to figure that out)? Then it says to switch to SQL view, add a subquery to the existing query that selects all students who play the guitar, run the query, and then save and close the query. Basically I need help with all of this haha, so if anyone could help me out I would really appreciate it. Here is the lab I'm working on Case 1 http://books.google.com/books?id=udW...bquery&f=false

    I'll post the lab below:
    Attached Files Attached Files

  11. #71
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Hey June7, if you could drop by and help me with my questions I would really appreciate it. Thanks and hope to hear form you soon.

  12. #72
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I didn't say to eliminate code from Current event. You really need it in both events.

    What do you mean by 'would not get the option box'? What 'option box' are you referring to?

    You should review tutorials or Access Help on building simple select queries - very basic Access functionality. SELECT queries can have sort and filter criteria. Filter criteria under MonthlyRentalCost would be <>0. Apply ASCEN sort order under whatever field is appropriate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #73
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Ok I created the query, but what will be the right subquery code to add to the existing query that selects all students who play the guitar? Here is the lab below:
    Attached Files Attached Files

  14. #74
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Why are you confused about building simple select queries with multiple criteria?

    Post the sql statement you attempted if you have an issue with it. Does it show the records you expect?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #75
    k14ton is offline Advanced Beginner
    Windows 7 32bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    55
    Here is the code I have, SELECT tblContract.LessonType, tblContract.StudentID, tblContract.ContractStartDate, tblContract.ContractEndDate, tblContract.MonthlyRentalCostFROM tblContract
    WHERE (((tblContract.MonthlyRentalCost)<>0))
    AND LessonType IN
    (SELECT LessonType
    FROM tblContract
    ORDER BY tblContract.LessonType, tblContract.ContractStartDate);

Page 5 of 6 FirstFirst 123456 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 03-09-2012, 04:21 PM
  2. Replies: 0
    Last Post: 02-23-2012, 10:42 AM
  3. Microsoft Access 2010 - Filtered report?
    By keaccesshelp in forum Reports
    Replies: 1
    Last Post: 02-21-2012, 03:36 PM
  4. Replies: 1
    Last Post: 09-13-2011, 01:52 PM
  5. Microsoft Access 2007 - 2010 Compatibility
    By AccessFreak in forum Forms
    Replies: 4
    Last Post: 01-05-2011, 07:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums