Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2010
    Posts
    15

    Question Unanswered: Access Form Data population issue

    Hello,

    I have a form that(by any means - either on load or button click) I need to populate data into several memo control fields I have setup on this form. I have run into an issue using the "Default Value" property because it only accepts 255 characters. My problem is that I have 600+ characters for some of these controls that I need to populate on load.

    I've tried everything I can to get the data into the memo fields. Most recently I attempted Me.Mytextbox = Me.Mytextbox & "all the data I need to populate". However, it still cuts off at the 255 character mark.

    I need some suggestions on how to handle this please! I'm not real accustomed to Access development so I'm hoping there is something I'm missing.

    Thanks!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What do you try to do with the DefaultValue property of the controls? As its name indicates, this property is used to supply a default value for the new records. It has nothing to do with binding a control to the recordset of the form.
    see: http://office.microsoft.com/en-us/ac...964511033.aspx

    If you want to assign a string value to a textbox, you can use:
    Code:
    Me.Text0.Value = "<Any string>"
    Its not limited to 255 characters.
    Have a nice day!

  3. #3
    Join Date
    Mar 2010
    Posts
    15
    I had tried the me.textbox.value = "" but I get the same result as using Default Value. It will display the text on form load, but it cuts off after character 255.

    Here is what I have:

    Private Sub Form_Load()
    DoCmd.SetWarnings True

    Me.Head.Value = "Hair is (insert description here). Scalp was normal. Head was normocephalic and atraumatic. Both tympanic membranes were clear. Sclerae and conjunctivae were clear. Pupils were equal, round and reactive to light. The irises are (insert color). Maxillary and frontal sinuses are nontender to palpation. Nasopharynx and oropharynx are both clear of exudate or lesions. Tongue is midline, the soft palate elevates symmetrically. The teeth are in good repair."

    End Sub


    It will cut off right at "Maxillary a" which are the last characters to be displayed in the control upon form load. This is for a dictated physician report as you can see. So I have several of these large texts I need to display upon form load.

    Why will the stupid control not display more than 255 characters no matter what? I even tried using a "DefaultInfo" table and putting the text into a field there. Then I used a Me.Textbox = DLookup ("[Myfield]", "DefaultInfo") and still the same?

    Please any ideas are helpful because if this doesn't work then I have to scrap this whole project and figure something else out!!

  4. #4
    Join Date
    Mar 2010
    Posts
    15
    Ok, holy crap. I just had a revelation. Just some more info before the flaming - I inherited this project from someone who did not know what they were doing, nor did they have anything anywhere near complete, and they gave me no notes or anything.

    Update - I noticed the "Format" property for each of my problem controls had an @ sign in it...I removed the @ sign and viola it works now?

    What does @ mean in format for access?

    Yeesh.. Be drinkin some of these tonight.

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    The "@" means that a charachter is required at this position. I don't understand why it truncates the string in the textbox but I'm glad you could solve the issue, though.
    Have a nice day!

Posting Permissions

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