Unable to copy the Primary ID to another form (1 Viewer)

Is this possibe

  • Yes

    Votes: 0 0.0%
  • No

    Votes: 0 0.0%

  • Total voters
    0
  • Poll closed .

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi All,
I am very new to MS Access and am really breaking my head for the last couple of days .
Would be really great if you could please help me .
Following is my requirement..

I have a main Form - ( Around 20 Projects - 20 Line Items)
When I click on the Project Number - It opens a Task
Every Project will have multiple Tasks
and when I click on Tasks it opens another form where I have to update the status depending upon the group

Now the problem here is when I click on the Tasks it opens the form but I am not able to save any data in that .When I close and come back all the data is gone.

Hope I was clear in making this understand
 

JHB

Have been here a while
Local time
Today, 15:47
Joined
Jun 17, 2012
Messages
7,732
Now the problem here is when I click on the Tasks it opens the form but I am not able to save any data in that .When I close and come back all the data is gone.
What is the record source for that form or is it unbound?
If unbound, you have to create some routine/VBA-code which save the changes to the table.
Else post a copy of you database with some sample data, (zip it then you haven't post 10 post yet).
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi JHB , Thanks for your revert.
I somehow managed to get it what I wanted. I really donot know how this VBA code works nor am I familiar with access codes. Whatever I learnt is through is opening design of other templates.
Now My Database has a1)Main form > Subform > Another form.
For exp .
Main form will have only the Projects > One of the fields on the Main form links to Subform which will have all the Tasks .
I want to upload data both into main form and Sub form Simultaenously

This is how it goes .
Main Form Sub Form
xyx (Main Project)
-----------T234( Tasks)
-----------t456 (Tasks)
QPR (Main Project)
-----------PR456(Tasks)


Could you please help me with this ?
Sub form will
 

JHB

Have been here a while
Local time
Today, 15:47
Joined
Jun 17, 2012
Messages
7,732
I want to upload data both into main form and Sub form Simultaenously
What do you mean with "Upload data", data your self type in or how?
Post a copy of you database with some sample data, (zip it then you haven't post 10 post yet).
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi JHB,
My apologies for missing your POST
I am having around 2000 entries so I cannot do it manually.
I am trying to import data from an excel sheet using the Import option on excel.
I have created the database in such way

Form A - Only the master entries
Form B Opens when I click on one of the field on the Main form
Form B will have all the relevant data which is related to Master Form ( Form A)

I want to enable an option when I upload the data it should automatically fit in the Form A and then passon to the Form B .

Also could you please let me know how to attach the database here
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 19, 2002
Messages
42,970
You'll need at least two queries. One to populate the project table and another to populate the tasks table. This process is different if you need to update existing projects and tasks rather than always add. And, we would need your complete spec to offer a solution. start by posting the schema (relationship window) and the spreadsheet.
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Can I send you the database for you to have a look .
Kindly let me know how do I attache it here
 

Attachments

  • William Tired.zip
    386.9 KB · Views: 105
Last edited:

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi I have sent you a sample data .
- Here when you open the database it opens the main PROJECT LIST form which is linked to table PROJECTS
- Now when I click on field PROJECT NAME it opens another form PROJECT DETAILS
under which there is another Datasheet form attached "PROJECT TASKS" which is linked to table TASKS.

My requirement is Under the PROJECT LIST I will be having 5 Projects
and every project will have around 100 Tasks which will be related to that project .
As the no is more . I want to upload the PROJECT LIST and PROJECT TASKS at one go and the 100 tasks should automatically relate itself to that particular PROJECT
 

JHB

Have been here a while
Local time
Today, 15:47
Joined
Jun 17, 2012
Messages
7,732
How do you do the import, from a form or how?
We need some sample data (raw data = data in Excel format)!
How in the future, will both the database and the Excel sheet be active?
If both - how would you decide, which change has to be saved/overwritten?
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
I am importing using an excel sheet.
All the data is stored in an excel.
That is my requirement . I am having around 1000 entries which i dont want to type manually just want to automatically upload to Access
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 10:47
Joined
Feb 19, 2002
Messages
42,970
You still haven't told us if this is a full replace or if you are trying to update what you have. Or are you trying to append new rows.

What is the purpose of the import? Is the data still modified in Excel? Are you also modifying it in the Access app? (please say no).

Interfaces with Excel are generally of three types
- conversions which happen only once. Once all the data has been loaded into Access, then the Access app has control of the data and all updating and reporting emanates from there.
- on-going imports. New data is collected in Excel and appended to existing tables. Once it is in the database, it is no longer updated in Excel.
- on-going refreshes. All data in the database is periodically replaced with new data from Excel. The data is still managed in Excel and is only imported to Access for archiving or reporting.
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi Pat,
The following suits best for me .
conversions which happen only once. Once all the data has been loaded into Access, then the Access app has control of the data and all updating and reporting emanates from there.

The answer what I am looking for it
I want to Import huge data ..where in under every Project there will be 100 tasks and I have around 10 projects .

So the Project Number should go into the Project List form
and Tasks Number should go into the Project Task form.
The only condition here is all the 100 Tasks should be linked to that one Project.
 

RWILLI

Registered User.
Local time
Today, 07:47
Joined
Oct 11, 2013
Messages
10
Hi Pat ,My apologies
I will be uploading data from excel regularly
So any new data from excel will go into Access
 

Cronk

Registered User.
Local time
Tomorrow, 01:47
Joined
Jul 4, 2013
Messages
2,770
You still have not answered the question. Answer a, b or c.

Does the data being uploaded from Excel?
(a) replace all the data currently in the database, or
(b) is it appended to the existing data in Access, or
(c) is it to replace existing matching records in Access if there is a match, or appended if there is no corresponding record in Access.
 

Users who are viewing this thread

Top Bottom