Cascading combo Error

Keeperen

Registered User.
Local time
Today, 12:42
Joined
Jun 26, 2012
Messages
19
Hello,

I have now spend hours and hours trying to make my first cascading combos, but now I need som help.

In the form FORM_Underark_aftaleseddel I have tried to make cascading combes in the last two cells Hovedaktivitet and Underaktivitet, but when I try to use the form it will not let me choose any values in the first combo box Hovedaktivitet.

Can anyone tell me where I'm off ?

In advance thanks.

Keeperen
 

Attachments

This as a 2010 version - few ppl have that. Save in 2007 or, preferably, 2003. Or show a screenshot of relations and paste code
 
Hello,

Unfortunately I have used some functionality that is not compatible with 2003. :-(

But here is some screenshots and code....

Option Compare Database

Private Sub Hovedaktivitetognr_AfterUpdate()
Me.Underaktivitetognr.Requery
Me.Underaktivitetognr.Locked = Me.Underaktivitetognr.ListCount < 1
Me.Underaktivitetognr.Enabled = Me.Underaktivitetognr.ListCount > 0
End Sub

Private Sub Hovedaktivitetognr_NotInList(NewData As String, Response As Integer)
Response = acDataErrContinue
End Sub

Private Sub Underaktivitetognr_NotInList(NewData As String, Response As Integer)
Response = acDataErrContinue
End Sub

Private Sub cmdClose_Click()
DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "FORM_Tbl_Underark_aftaleseddel", , , , , acDialog
End Sub




Keeperen
 

Attachments

  • Scandibyg_logo003.jpg
    Scandibyg_logo003.jpg
    20 KB · Views: 111
  • Scandibyg_logo004.jpg
    Scandibyg_logo004.jpg
    60.3 KB · Views: 117
  • Scandibyg_logo005.jpg
    Scandibyg_logo005.jpg
    96.1 KB · Views: 117
  • Scandibyg_logo006.jpg
    Scandibyg_logo006.jpg
    57.3 KB · Views: 129
"it will not let me choose any values in the first combo box Hovedaktivitet" what happens exactly? What do you do and what does the system do?

What is the combo bound to, that is, datatype of field?

Also, you are heading for a disappointment me thinks. Cascading combos in a continous/datasheet form are tricky, because the second combo has the same rowsource for all records. There are workarounds for that tho.
 
What happens is that when I open the form in normal view (not design) and want to select a value in the dropdown list of the first combo box. Then list is shown, but when I click nothing happens - no value is selected, it doesn´t close the list, nothing.

The combo is bound to a query as shown in picture 4.

Regarding tricky or not. I prefer not to make anything tricky, so please fill me in - in details. This is my first DB and my first cascading combo. I just picked out a post with an attachment and tried to make mine the same way. I know......total amature!!
 
"Bound to" means "the field in the form's record source (query or table) specified in the ControlSource of the combo".

You'll probably just have to wait for someone with 2010 to have a look. Or make a new db from scratch, with just the bits relevant for this issue and without the 2010 features, and save that as 2007 or 2003

Update: Your last pic shows that the combo is bound to a field that does not exist in the form.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom