Solved

access on update query columns are missing

Posted on 2013-01-30
2
302 Views
Last Modified: 2013-01-30
I have a combo box that is populated by a query and returns 3 columns - this is shown in the query result editor and consists of one number field (column 0) and two date fields columns 1 and 2.
I then have an after update event to populate two text boxes as follows:-

Private Sub Combo56_AfterUpdate()
Me.Text59 = Me.Combo56.Column(1)
Me.Text65 = Me.Combo56.Column(2)
Me.Combo56.Requery
End Sub

Open in new window



Text59 populates but Text65 does not - Only columns 0 and 1 are available and I can populate the two boxes with columns 0 and 1but column(2) is not returning.

The row source looks like this:-
SELECT FinancialYear.FinancialYear,
FinancialYear.FinYearStartDate,
 FinancialYear.FinYearEndDate 
FROM FinancialYear 
ORDER BY FinancialYear.FinancialYear; 

Open in new window

0
Comment
Question by:owenja
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 38837221
You must also insure that your Combo's ColumnCount and such are set correctly. For 3 columns, you'd have something like this:

ColumnCount = 3
ColumnWidths=0;1;1

That would hide the first one, and show the second two.
0
 

Author Closing Comment

by:owenja
ID: 38837232
Thank you - perfect answer
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question