473,473 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Update record via combobox selection in subform

6 New Member
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
  3.  
  4.  
  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
  16.  
  17. End Sub
  18.  
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
1 2453
Rosie
6 New Member
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

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

Similar topics

2
by: Tony Williams | last post by:
I have two tables one lists the names of committees and the other is a list of documents they generate. I have a form based on the documents table which gives details of the document including...
1
by: jdk | last post by:
I have a main form where a students name is selected. After selected the name- the subform populates all criteria related to the students program. I have 2 combo boxes in the subform that...
1
by: Argus Rogue | last post by:
Hello All Access Guru's: I was wondering if you could assist me with a little problem that I am having using subform. Is it possible to scroll down a subform to a particular record, click on...
0
by: Alienz | last post by:
hiya! I wanted to make a multiple selection drop down list and I found the easiest way to do this was by creating a subform linked to a table with 2 values, the 1st value links to the main form...
5
by: Andrew | last post by:
I've got a list box that selects a record on a subform, and in that subform are a few text fiels and a button that runs an update query. How do I have the update query button run and only update...
1
by: SuffrinMick | last post by:
Hi All I have two tables: tblRecords and tblOptions. tblRecords consists of RecordID (autonumber), Record (text) and Option (text record of options chosen) fields tbloptions consists of...
7
by: Stephen Poley | last post by:
I have the following situation: - a table of employees, keyed on employee-id; - a table of training sessions, keyed on session-id; - a requirement to log who was present at which session, plus...
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
0
by: TD | last post by:
I have a main form with two subforms (both in datasheet view), neither of which are linked to the main form. The main form is based on a query that uses the bound column of a combobox on the main...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.