Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 36 of 36

Thread: Solved: Record Locked Error 3188

  1. #21
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Thanks I'll get cracking.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  2. #22
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Let me know if you get stuck and I will give you a hand with the string work.

  3. #23
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Sorry I know I'm asking a lot here, but is there a particular way to modify a memo so it behaves as an acceptable input for the Instr Function?
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  4. #24
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    The only way that I know of is by converting it to a string, which brings you back to your problem of too many characters for a string.
    I have to ask this question, why does it have to be in the form of a memo field, why aren't you showing the data from the original notes as a subform?

  5. #25
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    One of the requests was that we keep the Memo available for the users to see all the notes they had made without clicking on a list box to view each one individual note. We already need to rebuild the system. It is crashing left and right with data turning up missing each time.

    I'm thinking it might be easier to just tell them this is not a wise feature and that the subform would make it easier.

    If they want to store the individual notes maybe I can find a way to just detect the new note and add it to the individual note table.... I'm just throwing out ideas... I'm at a loss as to what to do with this database... not because of this issue but because it is really just fickle.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  6. #26
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    I will post you a subform that presents the data like the memo.
    If you want to rebuild the database I will give you any help I can.
    The note addition "system" is a bit complicated compared to just entering the data in to a table via a form.

  7. #27
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Sorry, I can't get the subform to do it as the fields can't grow.
    But I have been looking at String sizes and I have built the string to over 250,000 characters without any problems.
    How large is your largest memo from your notes?

  8. #28
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    I just found something in the table design menu. It says that you can have an OLE object as a field type> So I could have a word document essentially be a field type? Do you know much about OLE Object Fieldtypes?

    I think 250,000 chars is great. I don't think I have seen one over 85K.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  9. #29
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Just assign the current big Memo to a string and then you can manipulate it with Instr, Left and Right.
    I will create something for you, no point in trying something new until we have exhausted the memo route.
    The problem with a word doc as an OLE is getting the data in to word, you would have to copy and paste it.

  10. #30
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Sorry the customers are asking me to design a new database while they try to piece data together. we have the current working version but certain data entries are getting matched up with different properties and we are having trouble identifying what the cause is. So they continue to add data but are limiting their data to the essential pieces that are working.

    I will try the above suggestion to manipulate the data. Thanks again for everything.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  11. #31
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    I got another system up that includes valid links directly to the issues that were missing so we are good to run.

    I was thinking that with your method of adding the note to the memo... I could possibly incorporate that process directly into the cmdAddRec_Click method. Do the split left-right if the date was not the latest date. otherwise it adds it directly to the memo when the note is added. Then there would be no reason to update the entire memo at once.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  12. #32
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    I got the add and delete to work fine if the date is greater than the last one posted... but I'm having trouble coming up with clear logic on finding the date to actually split and insert the data.

    Each new note is formatted as follows:
    ##/#?/####: AAA- BBB? vbNewLine
    noteString(possibly any length of string)
    vbNewLine & Form![frmMain[![Memo]

    that way there is a break after each individual note. I'm looking for some built in code that would step through each character until it found a vbNewLine character.... Then I could simply pull the subsequent characters until I find ':'. That would give me the compare date and I could use that to determine the location of insertion. If I find it first I'll let you know how I came up with it. Otherwise any help is appreciated.

    Is the vbNewline character the same variable representation of hitting the enter key? if so this might be a problem.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  13. #33
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    You have it right, the vbNewLine is the item to search for, each time you find it look for the date in the next 10 characters.

  14. #34
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    I discussed it with some of the other designers and I don't think it is necessary to sort the date. The note they enter will be inserted according to the actual date it was entered into the system. So if they need to reference a previous date they will do it in the notes section. Otherwise all additional notes will follow the structure you gave me where it is simply added to the top.

    The delete function works great. And so does the Update probably the most problamatic because in my VB infancy I declared the variables in the sub. ie Dim newMemo, oldMemo, edtCriteria as String right at the top of my function. The flow of the edit process requires the button to be pushed twice once to unlock the Memo field and other locked inputs, and the second to save the data and lock the memo and other inputs... So the first time all variables were set... when I clicked the second time of course the variables were all reinitialized and set back to null.

    I made the variables global and put a big comment box on them telling people not to mess with them... not that anyone touches Access but me... guess that's why they have interns. I'd say I'm done with this project for good. I still don't understand why it kept crashing when I tried to update the entire Memo at once... but it's been enough headache for one year. I'm calling this solution .. REALLY SOLVED> Thank you to OBP for your support and talk through.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  15. #35
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Good, vbNewLine wouldn't work.
    Adding CHR$(186) before the date works well when you want to find it.

  16. #36
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Thanks. You have been a great help.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •