?
Solved

access on update query columns are missing

Posted on 2013-01-30
2
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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