Actually, if the ComboBox is bound then I don't think that should be happening.
Actually, if the ComboBox is bound then I don't think that should be happening.
So I write that as VBA code?
The answer is YES. I take it this is an UnBound ComboBox (empty ControlSource)?
Correct, it is unbound.
Do you know how to get started with the code for the Current Event?
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.
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:
...using *your* ComboBoxName of course.Code:If Me.NewRecord Then Me.ComboBoxName = Null End If
Ahh, thanks a bunch once again.
Glad to be of service.
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
You are describing the action of an unbound control on a Continuous form. Is this the case?
Correct, it's still unbound.
Is it on a Continuous Form?
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
Are the ComboBoxes on the SubForm in Datasheet mode?