Solved

access on update query columns are missing

Posted on 2013-01-30
2
270 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
Comment Utility
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
Comment Utility
Thank you - perfect answer
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now