Solved

populating textfield using combobox access 2007, sql 2008

Posted on 2011-09-17
8
188 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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

18 Experts available now in Live!

Get 1:1 Help Now