Results 1 to 14 of 14
  1. #1
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10

    Text field wrong value

    I have a form of multiples items, but for now only 1 line


    I have a field "Largeur"
    and when I put a function using it in another field, it is the wrong value:

    [Largeur] gives 3,0625
    =[Largeur] gives 10318

    so if I use a function, it uses the 10318 instead of the valid value

    What is happening ?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I am guessing this is on a bound form and the field is either in the form header or form footer. If that's the case you will get inconsistent results if you are using =[largeur]. It will likely give you either the first, or last value of largeur in your list of items. The easiest way around this that I can think of is to limit your data entry field to individual records so you are only handling one record at a time. If that's not an option you may have to result to code to update the value in the form header/footer to coincide with the 'current' record.

  3. #3
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    Quote Originally Posted by rpeare View Post
    I am guessing this is on a bound form and the field is either in the form header or form footer. If that's the case you will get inconsistent results if you are using =[largeur]. It will likely give you either the first, or last value of largeur in your list of items. The easiest way around this that I can think of is to limit your data entry field to individual records so you are only handling one record at a time. If that's not an option you may have to result to code to update the value in the form header/footer to coincide with the 'current' record.
    It is on the same level
    Click image for larger version. 

Name:	access.png 
Views:	11 
Size:	226.1 KB 
ID:	16799Click image for larger version. 

Name:	access2.png 
Views:	11 
Size:	258.6 KB 
ID:	16800

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    is the form MarieLouisesListe a subform of Marie-Louise?
    if it's a subform are you using navigation panes, or are you using your own custom built subform?

    if it's a navigation pane I suspect that may be something to look at (I don't use navigation panes and someone may be able to answer that better than I could).

    I don't know french very well, what does 'Text Brut' mean (raw text?), if you are formatting this field as a text but the value in largeur is a number that could potentially be causing some problems (or vice versa).

  5. #5
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    Quote Originally Posted by rpeare View Post
    is the form MarieLouisesListe a subform of Marie-Louise?
    if it's a subform are you using navigation panes, or are you using your own custom built subform?

    if it's a navigation pane I suspect that may be something to look at (I don't use navigation panes and someone may be able to answer that better than I could).

    I don't know french very well, what does 'Text Brut' mean (raw text?), if you are formatting this field as a text but the value in largeur is a number that could potentially be causing some problems (or vice versa).
    no, it's my list form. When I double-click, it opens the detail form.
    text brut is raw text yes. How do I change it to number ? In format I put general number but there's still the case "text format" that is in raw text

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    the drop down list of the Format du Texte should give you an option to display the value as a number (long integer perhaps? or double?)

    I still think you are using some navigation pane functions because there is a dashed outline around the field in question. As I said I do not use navigation pane options so I am not sure what this denotes or what kind of function it serves. You can try deleting the control you currently have, putting a new control (text box in) and putting the formula back in on that new field (make sure it's not in the dashed outline) and see if you get a better result.

  7. #7
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    I don't know what are the navigations panes... If I'm using this, it's not by choice. I created a new form based on the table

    What I find weird is that if I write "=[Largeur]" it's the wrong result, but "Largeur" is ok... I don't even know what that number can be. I have only 1 record in this table

    The dashed outline seems to appear when I use the automatic disposition (a yellow line appears and the field copy the style)

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    if you want to supply an example of your database I can take a look, I'm really just shooting in the dark here. If you want to supply a sample db, just remove any private information from it, compact/repair then zip it up and use the GO ADVANCED button to attach a file to your next post.

  9. #9
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    Quote Originally Posted by rpeare View Post
    if you want to supply an example of your database I can take a look, I'm really just shooting in the dark here. If you want to supply a sample db, just remove any private information from it, compact/repair then zip it up and use the GO ADVANCED button to attach a file to your next post.
    I'm still in coding, so there's no personnal info yet. The form is MarieLouiseList

    I hope you won't have problems with the languages, I had some problems with that before (numbers format and stuff)

    encadrements petit.zip

  10. #10
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I don't know how you get to the form MarieLouisesListe, I could not find a double click event that you mentioned on any of the controls.

    However, I opened the form MarieLouisesListe manually, in the field that currently says =[Width]

    I typed in =[largeur] and it duplicated what was in your field [Largeur]

    It looks like you deleted the control I mentioned and put in a new control which seems to be functioning the way you want when you change the control source.

  11. #11
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by rpeare View Post

    However, I opened the form MarieLouisesListe manually, in the field that currently says =[Width]

    I typed in =[largeur] and it duplicated what was in your field [Largeur]
    I did the same thing, with the same results.

    Linq ;0)>

  12. #12
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    Thanks guys you made me realise what was the problem.

    You saw =[width], but on my side it is [Largeur]

    I used the same word as the property. Since you were in english, you don't have the name conflict

  13. #13
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Then why does the Bound Control read Largeur, instead of width?

  14. #14
    xcheshirecat is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Posts
    10
    Because it's bound, it knows it is not a property ?

    Anyway, I change my field to LargeurML, so now it works

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Report ascending wrong field
    By Ruegen in forum Reports
    Replies: 3
    Last Post: 11-10-2013, 08:10 PM
  2. Replies: 5
    Last Post: 11-01-2013, 10:34 AM
  3. Replies: 4
    Last Post: 08-12-2013, 11:00 AM
  4. Updating field goes to wrong record
    By chrismalan in forum Forms
    Replies: 7
    Last Post: 03-20-2011, 08:07 PM
  5. Replies: 20
    Last Post: 09-18-2010, 02:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums