Solved

How to Save a Memo box to Queried records

Posted on 2015-01-13
9
125 Views
Last Modified: 2015-01-14
Hello,

I have one memo box on my form for each change.  I need to save the memo comment to all my queried records.  How do I do that??
0
Comment
Question by:Jass Saini
  • 5
  • 3
9 Comments
 

Author Comment

by:Jass Saini
ID: 40547179
Here is my code..It updates everything and I just need to to update the queried records...

Private Sub Remarks1_Click()
    Dim strMsg As String, strQry As String, strRemark As String
    
    strMsg = "Update All Comments in the Current view.  IMPORTANT!!! Will update a the Viewed records."
    
    If vbYes = MsgBox(strMsg, vbYesNo, "IMPORTANT!!  Confirmation") Then
        strMsg = "Please enter the remark"
        
       strRemark = InputBox(strMsg, "Remark")
        
       If Len(strRemark) > 0 Then
            strQry = "Update Final_Table set Remarks1 = Remarks1 &  '--" & strRemark & "'"
            QuickQry strQry, False
            Me.Requery
        End If
    Else
        MsgBox "Action cancelled."
    End If
    
End Sub

Open in new window

0
 

Author Comment

by:Jass Saini
ID: 40547247
I am not asking how to combine it anymore..I figured out to into in to one..now I need to update and save to the other records.  Which is different than combining...
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40547559
If you are taking a memo field and applying it to multiple rows, you almost certainly have a design flaw.  The memo field probably belongs in the parent record.
0
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

Author Comment

by:Jass Saini
ID: 40547599
Pat...what do you mean parent record.  Is my coding incorrect too??
0
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40547686
I didn't look at the coding.  I am questioning why you would want records to all have the same comment.  For example, in an order entry system we have tblOrder and tblOrderDetails.  If I wanted to put a note about the delivery of the order, I would not put it in the tblOrderDetails, I would put it tblOrder.  Why would I want the same note to appear on each line item when it could appear once on the order.  However, if the note was specific to a line item, then the note belongs on the line item.  In your case, you are saying that each line item should have the identical note as every other line item for a given order.  The problem may be the way your tables are structured.  If you don't have a "parent" table to group the rows where you can store information about ALL the rows, then perhaps you should.  Technically, you can create an order entry application with only tblOrderDetails.  The problem is that you would have the order number, client name, billing address, shipping address, tax, shipping cost, etc all repeated for each OrderDetail.
0
 

Author Comment

by:Jass Saini
ID: 40547703
That's is what I asked...But I have a set of records from a query and my boss wants all of them to have the same memo...

Don't ask me why...I was told to just say yes..anything can be done in access.. My boss doesn't know the limitation of access.  It's a great tool if you know how to use it???
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 40547936
We are not talking about a limitation of Access.  We are talking about properly structuring your schema.   If you get the schema right, many things will simply fall into place and you won't have to struggle so much.  If you get the schema wrong (as you may be in this case), you'll have a nightmare on your hands.   The "boss" shouldn't be telling you how to store data, that is for you to decide.  You are the technical person.  What he is telling you is how he wants to "see" the data and that is a completely different topic.  To "see" the memo attached to each row, you only have to join to the table where it is stored and select it.  That satisfies the boss' request for how he wants to view data and doesn't cause any structural problem with the schema because you haven't stored duplicate data.

Once you manage to follow the directions the others will give you, you will have succeeded in committing the crime of the century from the perspective of proper database design.  Once you duplicate the data, do you have a plan for keeping all the separate copies in sync?
0
 

Author Comment

by:Jass Saini
ID: 40549157
Thanks Pat....I have been following directions...everything time I think I am at the end of my road..I end up at a crossroad.  Thanks for your help!
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

832 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