Solved

populating textfield using combobox access 2007, sql 2008

Posted on 2011-09-17
8
224 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
[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
  • 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

730 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