Solved

populating textfield using combobox access 2007, sql 2008

Posted on 2011-09-17
8
230 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

729 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