Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Updating

Posted on 2015-01-07
15
Medium Priority
?
128 Views
Last Modified: 2015-01-07
Hello,

If my form is based off a table ..and I am only pulling in certain records on the form based off the query...How can I just copy that one record that was updated??
0
Comment
Question by:Jass Saini
  • 7
  • 4
  • 2
  • +1
15 Comments
 
LVL 31

Accepted Solution

by:
hnasr earned 2000 total points
ID: 40536465
Form displays few records.
You display record with id: x
Record updated.

In form after update:

QueryUpdated.SQL = "Select * from tbl where [id] ='" & Me!x & "'"
DoCmd.OpenQuery "QueryUpdated"
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 40536480
...How can I just copy that one record that was updated??

Copy the one record where???  To a new table???

ET
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40536541
^ what etsherman asked...

..in addition, it is still unclear as to why you need to "Copy" this data/record...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:Jass Saini
ID: 40536580
Yes copy to a new table
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40536586
Why?
...this would be creating redundant data....
0
 

Author Comment

by:Jass Saini
ID: 40536608
My boss changed the structure of my table but she wants me to keep the structure of my form (based off the orginial table)...
0
 

Author Comment

by:Jass Saini
ID: 40536610
I can send you my DB to see what I am talking about..Can I message it to you?
0
 
LVL 19

Expert Comment

by:Eric Sherman
ID: 40536621
Still not clear as to what it is you are trying to accomplish.  

Copy a record to a new table based on what event???  What fields you want to copy???  You are referring to fields where some are on a main form and some are on a subform.  You have to be more specific in describing your question.

ET
0
 

Author Comment

by:Jass Saini
ID: 40536675
what difference does it make what fields I am trying to copy.  I would just like to know is that appropriate to do or is that something that is limited by access???  When I do the duplicate record command button and I use this button on the subform..it will only copy the fields that are on the sub form...I am trying to figure out how to copy "ORG Name" field and FUND field which is on my main form too
0
 
LVL 31

Expert Comment

by:hnasr
ID: 40536685
"changed the structure of my table but ... keep the structure of my form "

Bear in mind, the appearance of the form is a user's liking, but form's operation is your job.

Use the new table structure, and base the form on a query of the new table adding the relevant alias names.
0
 
LVL 31

Expert Comment

by:hnasr
ID: 40536689
You may upload a cut down version of the database if more help is needed.
0
 

Author Comment

by:Jass Saini
ID: 40536705
hnasr..My boss made the table where the field data was..ie...communication, printing, salaries...into heading.  But she still wants that data showing up vertically...I guess I am too new and I don't see how that is possible.  She perform a crosstab query on my table and wanted that to be made into new table (less records storage).

So instead of being a field and everything was vertical..she changed them into headings.

I am having a problem visualizating how from the form which the user info goes into my orginal...how to copy that info (record into the new table)
0
 

Author Comment

by:Jass Saini
ID: 40536724
Here is my database...Final_Table is my orginal table ...Final_frm is my form (based off Final_Table) .  Final_table_Crosstab is my new table.  Thank you for your help.  It took me about six months to get to this point and then the table was changed on me
Database13.accdb
0
 
LVL 31

Expert Comment

by:hnasr
ID: 40536900
@JAss Saini

Looked at the two tables.
Here is a few points to raise with your boss.

The original table is needed for data entry, and it should follow what is called a normalized table.
Crosstab is a type of query which summarizes data from a table. It is sort of reporting action.
The original table enters itemized data.
The crosstab totals data per group of categories.

The query is seen by access as a table and as such you may not have the same name for both a table and a query in the same database.

You may have x table, x report, x module, and x table but no x query.

Show her the result of the crosstab query whenever you modify the original table.

It looks like a table, viewed, used as a source in a report.

You may use it in a form for inquiry, but not for data entry, or you will break the purpose of using a computer. (adding values in your head, and entering the total in a crosstab)

Other thing to remember, that no calculated totals to be stored in a table. Always use queries to display totals.

One needs to prepare the work in a way to be accepted for automation. Automating a manual process as it is may end up with unmanageable database.

Last point, boss is interested in the what part of the job (displaying the results), programmer worries about how to process the data to show the result.

Wish you good luck!
0
 

Author Comment

by:Jass Saini
ID: 40536921
Hello,

Thank you...That's what I have been telling...but her boss has this vision and she to do what she can to please him.  Which is fine...but there are some thing that a new access person can not do...And you an expert have confirmed this.

In the crosstab table, she wants to be able to copy the record with the updated changes and I am not there as a programmer yet.

"You may use it in a form for inquiry, but not for data entry, or you will break the purpose of using a computer. (adding values in your head, and entering the total in a crosstab)"
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

578 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