Solved

populating textfield using combobox access 2007, sql 2008

Posted on 2011-09-17
8
198 Views
Last Modified: 2012-05-12
Hi,

Have a subform in my form:

There is a combo box which displays taskID and TaskDescription and bound TaskID to the combobox. and should display taskdescription in the textfield beside it and then automatically display the next row of combobox and textfield for the second entry.

The problem I have, I can not populated the textfield after making a selection. I keep getting #Name? in this text field.

Here are how combobox and textfield set up:

TaskID  TaskDescription

TaskID
All: cmb_task
control source: TaskID
AfterUpdate:Event Procedure : Me!Task = cmb_task.Column(1)

Data:
control source: taskID
row source: select taskID, task from task  bound column: 1,

TaskDescription:
Name: Task
controlsource: Task

Date: control source: TASK

how can I get this fixed. (when I make the task textfield unbound, then it does not add the second row...)

thanks in advance




0
Comment
Question by:shmz
  • 4
  • 4
8 Comments
 
LVL 12

Expert Comment

by:pdebaets
ID: 36555142
Is TaskDescription in your combo box rowsource?
0
 

Author Comment

by:shmz
ID: 36555196
The row source for combobox is the select statement: select taskID, taskdescrription from task.
Bound column is 1.
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 36555202
If your combo box is named MyComboBox, then try setting your task description textbox control source to

=MyComboBox.Column(1)
0
 

Author Comment

by:shmz
ID: 36555228
That is exactly what is done but it is not working:

TaskID
All: cmb_task
control source: TaskID
AfterUpdate:Event Procedure : Me!Task = cmb_task.Column(1)
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
ID: 36555251
I'm not sure if we're talking about the same thing here.

It sounds like you have a text box that you want to have display the task description. If so, set the text box control source to "=cmb_task.Column(1)"

If i'm misunderstanding, please set me straight.
0
 

Author Comment

by:shmz
ID: 36555279
It was initially set in the after update event of TaskID combobox.
If I understood you correctly, I removed initial code and I added "=cmb_task.Column(1)"
to the control source of textfield in the property sheet.

unfortunately it is still displaying the #Name?
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 36555469
Let's verify the name of your combo box control. Is it "cmb_task", or is it named something else?
0
 

Author Closing Comment

by:shmz
ID: 36595389
thanks
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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 …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

911 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

24 Experts available now in Live!

Get 1:1 Help Now