Solved

access on update query columns are missing

Posted on 2013-01-30
2
289 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

773 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