Results 1 to 6 of 6
  1. #1
    Join Date
    May 2005
    Posts
    54

    Exclamation Unanswered: HELP!! Form is not saving added data entry

    Please keep in mind that I am a newbie....

    If you look at the attached database....you can see when you try to enter new information (1st item on switchboard) that it isn't saving it. I know I have something screwed up more than likely relationship-wise.

    Can anyone take a look and let me know how to fix this??
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2007
    Posts
    9
    It appears that your Primary Key field (Salesman Number) is user defined but when you are trying to add a new employee you don't have a field to assign the Primary Key. You can fix this either by changing the Primary Key field from "text" to "autonumber" or by including a text box for the user to assign the Primary Key field along with the person's name.

  3. #3
    Join Date
    May 2005
    Posts
    54
    I added an autonumber field as the primary key in the employee table. However, that doesn't fix my problem. It saves the data entered in the Budget and Margin Information Table, but is not applying the information to a salesman.

    Any other suggestions?

  4. #4
    Join Date
    May 2005
    Posts
    54
    I've tried changing the relationship....and that doesn't seem to work either. At this rate, I will be bald by the time I'm 40

  5. #5
    Join Date
    May 2005
    Posts
    54
    I also created Salesman Number as a separate table and linked to it from both the Employee table and the Budget and Margin Information table. It still isn't saving the information input into the form.

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You need to first solve the problem with the Employee table not being updated when you enter a new salesman (create an autonumber field for the table and make sure the "salesman number" field is on the "Enter Info" form and populated with a value.) Then you need to put the salesman number field on the "Enter Info Subform" form and set the default value or somehow populate this field with the value from the Enter Info field (i.e. set the default value = Forms![Enter Info]![Salesman Number])

    Notice your error when you try to create a new salesman on the Enter Info form "Index or Primary key cannot contain a null value!" (it needs a salesman number value!)

    Your Enter Info Subform (Budget and Margin Information table) is being populated but it isn't populating it with a salesman number (which is the joined field between that and the Employee table) because you don't have the salesman number field on the form and it has no reference to populate a value from.
    Last edited by pkstormy; 01-24-08 at 00:06.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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