Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10

    The Value you entered isn't valid for this field

    Would be fantastic if someone could help me here. I am not a complete novice but the fact that I am getting this error message tells me I am not as good as I thought I was....

    I have two tables as follows -

    Customer Addresses
    Salesmen

    I have created a form that has a combo box on it that lists salesmen from the Salesmen table and should store them on the customer addresses table in a field called Our Rep.

    I have a relationship between each table with the field Salemen ID linked with a one to many relationship (autonumbered in the salesmen table.

    Other than the error I receive, I note that the two tables aren't sharing the autonumbered field, ie the Salesmen ID field on the Customer Address table isn't showing the number from the Salesmen ID on the salesmen table.



    I hope this all makes sense, any help would be much appreciated.

    Rob

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you use the cbo wizard to create the ComboBox on your form? The wizard knows how to do this correctly. The [Our Rep] field should be a LongInteger.

  3. #3
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    Thanks for that ruralguy, I am slightly lost now. The field [our rep] is a text field, which is obviously the problem then, but it has left me struggling to get my head round the issue.

    I am using two numbers from two tables to link them (salesmen ID) and want the field [our rep] to store the text from the table that is listed as [salesman].

    I have attached the file so you can take a look if at all possible. The field names I used are not the field names in the database, just to confuse matters, but basically take a look at the form that is on the database and try to move through the records and you will see what I mean. This appears to be due to the salesman combo box.

    Again any help would be great !

    Thanks, Rob

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If the [Our Rep] field is a LongInteger then you can display the Rep's name in a query that joins the two tables.

  5. #5
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    I am really not sure what you mean by this, I thought the idea was to share the two pieces of ID information which each share the same type (ie long integer) and then use the other field from the salesman table to display the associated text.

    I am having a bit of a Monday here and probably my brain isn't functioning ???

  6. #6
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    Have spent about two hours trying to sort this and still pulling my hair out.....

    Help me please before I lose my sanity....

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    See if this is what you had in mind.

  8. #8
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    Yes, broadly speaking it is. The issues now are that it doesn't let me select the salesman from the combo box and then assign the number to the table in the background.

    If I can select the salesman from the combo box I think it will be resolved. What did you do and what do I have to do to fix the last bit ?

    Many thanks

    Rob

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    It does for me. Have you looked in the table to see if there are values for the SalesmanID?

  10. #10
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    Yes the values are there. It actually wont let me change any of the information on the form though. Is this because you saved it as read only perhaps ?

    This to one side, what was I doing wrong ? I imagine it was something fairly silly ?

    thanks again

    Rob

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You lost me. I can change values in the form. What values will it NOT let you change?

  12. #12
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    It won't let me select from the combo box at all, although it will allow me to pull down the choices. But other than this I can't change any of the other information on the screen either, such as the addresses for instance.

    Perhaps you can tell me what I was doing wrong and I can change it on my version thus killing two birds with one stone ?

    Really really grateful for your help

    Rob

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'm sorry Rob but I can do all of those things on the version I have. It works for me but not for you??? Did you change anything in what I uploaded?

  14. #14
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    No not at all, I have just double clicked and opened it. Very strange, I can't understand why it doesn't work ???

    I have taken a look to see the changes you made. What is the purpose of the extra * field on the tables and subsequent reference within the query ? What else did you do ?

    This seemed like it should be so straight forward and it obviously wasn't ?

    thanks

    Rob

  15. #15
    FabianBom is offline Novice
    Windows 2K Access 2003
    Join Date
    Mar 2010
    Posts
    10
    Aha, I have worked it out, it was because I was using it straight from the zip file without extracting it ! Fantastic, I have a working version now.

    I just need to get my head fully round what you did to fix it now and why ?

    Thanks

    Rob

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Save backup as valid name
    By timpepu in forum Access
    Replies: 0
    Last Post: 12-18-2009, 03:03 AM
  2. Replies: 1
    Last Post: 09-19-2009, 09:37 AM
  3. Replies: 5
    Last Post: 08-05-2009, 12:13 PM
  4. Replies: 1
    Last Post: 07-21-2009, 03:01 PM
  5. one date entered to hit 3 fields in one table how?
    By techexpressinc in forum Queries
    Replies: 0
    Last Post: 12-10-2008, 10:43 AM

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