PC Review


Reply
Thread Tools Rate Thread

Changes in Form (based on query) are reflected to the wrong table

 
 
Aldo
Guest
Posts: n/a
 
      21st Jun 2009
Hi guys,

I am new to MS Access. I am working with Access 2007.
I have some problems while creating a form.

I have created the following tables:

Table "People":
PeopleID FirstName
2 Aldo

Table "Tasks":
TaskID TaskDescription
2 A
3 B
4 C

Table "PeopleTasks":
PeopleTasksID PeopleID TasksID
2 2 3

I have a query named "Get_PeopleTasks" as follows:
SELECT
People.FirstName,
Tasks.TaskDescription
FROM
(People
INNER JOIN PeopleTasks ON People.PeopleID=PeopleTasks.PeopleID)
INNER JOIN Tasks ON PeopleTasks.TaksID=Tasks.TaksID;

Running the query I get the data below:
FirstName TaskDescription
Aldo B

I need to create a form to quickly updating data in those tables, in
example, changing "B" to "C" will also change the value of field " TasksID"
from "3" to "4".
I created a new form based on query "Get_PeopleTasks", changed
TaskDescription as combo box and programmatically set it to show the values
in table "Tasks.TaskDescription" on form load.
When trying to change the value in the combo box (clicking on another
option), I get the change reflected in table "Tasks", so the values in the
table will look that:
TaskID TaskDescription
2 A
3 C
4 C

How can I work it around?
What I am doing wrong?

Thanks in advance for any help,
Aldo.
 
Reply With Quote
 
 
 
 
Aldo
Guest
Posts: n/a
 
      22nd Jun 2009

I'll try it.
Thanks a lot,
Aldo.


"June7 via AccessMonster.com" wrote:

> Your query needs the field TasksID from the PeopleTasks table and the combo
> box should be bound to this field. Right now it appears to be bound to the
> TaskDescription field of Tasks table so you are changing the description in
> that table but not changing the task ID that the record in PeopleTasks is
> linked to. The RowSource in the combobox should include the TaskID and
> TaskDescription (in that order) from Tasks table but the ControlSource should
> be TasksID of PeopleTasks table. Users should see the task description but
> not the ID in order to make informed choice. Set the ColumnCount to 2,
> ColumnWidths to 0;2.
> You can build the query in the form's RecordSource property, doesn't have to
> be a saved query.
>
> Aldo wrote:
> >Hi guys,
> >
> >I am new to MS Access. I am working with Access 2007.
> >I have some problems while creating a form.
> >
> >I have created the following tables:
> >
> >Table "People":
> >PeopleID FirstName
> >2 Aldo
> >
> >Table "Tasks":
> >TaskID TaskDescription
> >2 A
> >3 B
> >4 C
> >
> >Table "PeopleTasks":
> >PeopleTasksID PeopleID TasksID
> >2 2 3
> >
> >I have a query named "Get_PeopleTasks" as follows:
> >SELECT
> >People.FirstName,
> >Tasks.TaskDescription
> >FROM
> >(People
> >INNER JOIN PeopleTasks ON People.PeopleID=PeopleTasks.PeopleID)
> >INNER JOIN Tasks ON PeopleTasks.TaksID=Tasks.TaksID;
> >
> >Running the query I get the data below:
> >FirstName TaskDescription
> >Aldo B
> >
> >I need to create a form to quickly updating data in those tables, in
> >example, changing "B" to "C" will also change the value of field " TasksID"
> >from "3" to "4".
> >I created a new form based on query "Get_PeopleTasks", changed
> >TaskDescription as combo box and programmatically set it to show the values
> >in table "Tasks.TaskDescription" on form load.
> >When trying to change the value in the combo box (clicking on another
> >option), I get the change reflected in table "Tasks", so the values in the
> >table will look that:
> >TaskID TaskDescription
> >2 A
> >3 C
> >4 C
> >
> >How can I work it around?
> >What I am doing wrong?
> >
> >Thanks in advance for any help,
> >Aldo.

>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/For...dules/200906/1
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updated form info not reflected in table kbkamm Microsoft Access Forms 1 8th Jan 2009 10:36 PM
i change data in the table but it's not reflected in the form? =?Utf-8?B?YWxleDE=?= Microsoft Access 1 19th Aug 2005 10:44 PM
Change to underlying tables not reflected in a query or form? me Microsoft Access Forms 1 27th Aug 2003 01:26 PM
Info entered into form not being reflected in table. HELP!!! Rhythm Microsoft Access Forms 1 27th Aug 2003 05:16 AM
Change in Table not reflected in QUERY unless you CLOSE/OPEN query me Microsoft Access Queries 0 21st Aug 2003 10:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:00 PM.