Solved

How to Save a Memo box to Queried records

Posted on 2015-01-13
9
119 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 34

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
 

Author Comment

by:Jass Saini
ID: 40547599
Pat...what do you mean parent record.  Is my coding incorrect too??
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
LVL 34

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 34

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now