By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,187 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,187 IT Pros & Developers. It's quick & easy.

Update record via combobox selection in subform

P: 6
I have a main form with header info w/ 'tHeader' as the control source.

I have a subform with 'tDetail' as a control source.

They're strung together by a field named MA_ID.

This works fine.

I have a field within the subform that I want to update via a combobox located on the same subform.

The field I want to update is currentissue. It's a field on the tDetail table.

There is another field on the tDetail table called SubIssueReason.

Based on the selection chosen in currentissue, I want to display certain possibilities in the SubIssueReason combobox. I have done this and it works fine. Here's how I'm establishing rowsource in the combobox:

Expand|Select|Wrap|Line Numbers
  1. Private Sub CurrentIssue_AfterUpdate()
  2. Dim strSQL As String
  5. If Not IsNull(Me.CurrentIssue) Then
  6.         Me.IssueSubReason = ""
  7.         strSQL = "SELECT qissuesubreason.issuesubreason " _
  8.         & "FROM qissuesubreason " _
  9.         & "WHERE  " _
  10.         & "qissuesubreason.issuecode='" & Me.CurrentIssue & "' " _
  11.         & "ORDER BY qissuesubreason.issuesubreason"
  12.         Debug.Print strSQL
  13.         MsgBox strSQL
  14.         Me.IssueSubReason.RowSource = strSQL
  15. End If
  17. End Sub
So: the combobox populates appropriately, but I am unable to select anything in it--I arrow down, the appropriate options appear, but I can't select them.

I understand this question has been asked and answered about a thousand times and this is not the freshest of problems, but I can't figure out why this thing isn't working for me, and I've been on it for three days. So I humbly beg your indulgence. I have read Rabbit's overview from 07 on this and have been unable to figure out where I'm going wrong.
Oct 28 '08 #1
Share this Question
Share on Google+
1 Reply

P: 6
Sorry, I meant to add:

Based on the overview I read, the row and control sources seem right--the rowsource is set via the code above, the controlsource is the tDetail table.
Oct 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.