Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 35
  1. #16
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

    Actually, if the ComboBox is bound then I don't think that should be happening.

  2. #17
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    So I write that as VBA code?

  3. #18
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The answer is YES. I take it this is an UnBound ComboBox (empty ControlSource)?

  4. #19
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    Correct, it is unbound.

  5. #20
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you know how to get started with the code for the Current Event?

  6. #21
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    No, I'm sorry I don't. I do not have any background in the VBA side of Access and Access is all pretty new to me. I just took a class for it but it didn't cover VBA. I think I'm about to look into taking a class for it though.

  7. #22
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Get to the property sheet for the FORM and select the Event tab and then the "..." button on the CurrentEvent line. It should take you to the code module for that form aith stub code already entered for that event. Then In between the Private and the End Sub lines you will want something like:
    Code:
    If Me.NewRecord Then
       Me.ComboBoxName = Null
    End If
    ...using *your* ComboBoxName of course.

  8. #23
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    Ahh, thanks a bunch once again.

  9. #24
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad to be of service.

  10. #25
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    Allan, I'm hit a snag. When I go in and am entering new entries, if I pick a different storm name than previous entries, it changes all storm names. Help please!!

    Here is the current VBA

    Option Compare Database
    Option Explicit

    Private Sub cboPW_AfterUpdate()
    Me.cboCref.RowSource = "SELECT CPSBRefID,Description1 FROM" & _
    " [CPSBRef] WHERE PWNumberID = '" & Me.cboPW & "'" & _
    " ORDER BY CPSBRefID"
    Me.cboCref.Enabled = True
    End Sub

    Private Sub cboStorm_AfterUpdate()
    Me.cboPW.RowSource = "SELECT PWNumberID,Description1,Location,PMAmount FROM" & _
    " [PW Codes] WHERE StormID = '" & Me.cboStorm & "'" & _
    " ORDER BY PWNumberID"
    ' Me.cboPW = Me.cboPW.ItemData(0)
    Me.cboPW.Enabled = True
    End Sub

  11. #26
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are describing the action of an unbound control on a Continuous form. Is this the case?

  12. #27
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    Correct, it's still unbound.

  13. #28
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is it on a Continuous Form?

  14. #29
    LesleaOH is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2009
    Posts
    19
    This form opens up in add new only. They can only see the new entries and make changes to only those new entries. Once they close the form, it clears out the sub form datasheet

  15. #30
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are the ComboBoxes on the SubForm in Datasheet mode?

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-24-2009, 10:36 AM
  2. Cascading Combo Boxes
    By gjw1012 in forum Access
    Replies: 1
    Last Post: 07-25-2009, 04:59 PM
  3. combo boxes
    By googenfrog in forum Forms
    Replies: 3
    Last Post: 07-03-2009, 05:41 PM
  4. combo boxes
    By labrams in forum Forms
    Replies: 0
    Last Post: 04-20-2006, 09:28 AM
  5. Combo Boxes
    By Mxcsquared in forum Forms
    Replies: 0
    Last Post: 01-19-2006, 04:59 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