Update the table from the form

  • Thread starter time_racer via AccessMonster.com
  • Start date
T

time_racer via AccessMonster.com

Hi,

I am a new user to MS Access 2007, I've created 2 forms and 2 tables. The
first table contains the staff information ID, Name, Password and their login
Date.
The second table contains their activity during that date which contains the
following fields ID, Reference # , Tasktime, and TaskDate

the forms reflects these tables, and for the first form I was able to create
it sucessfully. However what troubles me is passing the ID of the first form
to the second table, so the second from would start its process after
fetching the ID from the second table.
 
J

John W. Vinson

Hi,

I am a new user to MS Access 2007, I've created 2 forms and 2 tables. The
first table contains the staff information ID, Name, Password and their login
Date.
The second table contains their activity during that date which contains the
following fields ID, Reference # , Tasktime, and TaskDate

the forms reflects these tables, and for the first form I was able to create
it sucessfully. However what troubles me is passing the ID of the first form
to the second table, so the second from would start its process after
fetching the ID from the second table.

Make the second form a Subform of the first one. It will link up ID's
automatically.
 
T

time_racer via AccessMonster.com

John said:
[quoted text clipped - 8 lines]
to the second table, so the second from would start its process after
fetching the ID from the second table.

Make the second form a Subform of the first one. It will link up ID's
automatically.

Hi John

Thanks for the hint, will it seems I didn't explain it very well. Let's see,
my access is as following:

Tables:
1- Login Table : which contains: ID, Usernames and Passwords and it is
already filled with the required data
2- Task Table: it contains : ID ID, Reference # , Tasktime, and TaskDate and
those data are not filled, it should be filled from the first login form. (i.
e. the user who loges in the form would carry his/her ID to the task table,
and then the second form start working from that ID)

Forms:
1- Login Form: which contains ( ComboBox to choose user ID, Text Box shows
selected username, and text box for password to verify the right user)
2- Task form: which contains ( Text Box contains the ID of the user who
logged in (should be fetched from the Task table), TextBox for Task reference
number, and Button to log the tasks and timing in the Task Table)

Now my problem is in passing or entering this user ID from the combo box of
the login Form to the task table and store it there to be used by the task
table (should I use global variable?!!)
 
J

John W. Vinson

John said:
[quoted text clipped - 8 lines]
to the second table, so the second from would start its process after
fetching the ID from the second table.

Make the second form a Subform of the first one. It will link up ID's
automatically.

Hi John

Thanks for the hint, will it seems I didn't explain it very well. Let's see,
my access is as following:

Tables:
1- Login Table : which contains: ID, Usernames and Passwords and it is
already filled with the required data
2- Task Table: it contains : ID ID, Reference # , Tasktime, and TaskDate and
those data are not filled, it should be filled from the first login form. (i.
e. the user who loges in the form would carry his/her ID to the task table,
and then the second form start working from that ID)

Forms:
1- Login Form: which contains ( ComboBox to choose user ID, Text Box shows
selected username, and text box for password to verify the right user)
2- Task form: which contains ( Text Box contains the ID of the user who
logged in (should be fetched from the Task table), TextBox for Task reference
number, and Button to log the tasks and timing in the Task Table)

Now my problem is in passing or entering this user ID from the combo box of
the login Form to the task table and store it there to be used by the task
table (should I use global variable?!!)

No.

You should do as I suggested.

Make the Task for a Subform on the login form.

Set its Master Link Field to the ID (or to the name of the ID combo box); set
its Child Link Field to the ID field in the task table.

It'll work; trust me.
 
T

time_racer via AccessMonster.com

John said:
[quoted text clipped - 28 lines]
the login Form to the task table and store it there to be used by the task
table (should I use global variable?!!)

No.

You should do as I suggested.

Make the Task for a Subform on the login form.

Set its Master Link Field to the ID (or to the name of the ID combo box); set
its Child Link Field to the ID field in the task table.

It'll work; trust me.


Dear John

It worked Thanks for the help,
However the subform in Access2007 is taking the shape of table can I change
that, I mean I can't add a button to that subform for clicking
 
J

John W. Vinson

It worked Thanks for the help,
However the subform in Access2007 is taking the shape of table can I change
that, I mean I can't add a button to that subform for clicking

Open the Form in design view; change its Default View property from
"Datasheet" to "Continuous Forms". You'll probably need to reposition the
textboxes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top