Results 1 to 8 of 8
  1. #1
    turnertj is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    5

    Entering & retreiving data with Forms

    I'm an access newbie, so please forgive me if I'm asking something that's already been answered. I've tried searching the forum and haven't quite found the fix.

    I'm using a form to enter data into a new database. It all seems to work except for one snag. I can enter the data just fine, and can retreive (i.e. view and then re-edit) any record as long as one specific field is filled out (which turns out to be a telephone number). If I enter in a record and don't have a phone number filled in, then it records all the data fine in all of my tables, but I can't use the form to see the record again.

    The database is setup with Child Tables connecting to the Parent Table. The PhoneNumber Table is one of those Child tables, so that each record could have multiple phone numbers. I have many other tables setup exactly like this table is, and none of them behave this way.



    Any idea why?

    Thanks.

  2. #2
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    The relationship between the tables is one-to-many, so you should have a form with a subform.

    I imagine under that form is a query with the default join type: inner join. In an inner join, only the records that are present in both tables are presented in the query results. Since the key for that record isn't in the Phone table, it isn't produced by the underlying query.

    But again, you should have a form with subform.

  3. #3
    turnertj is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    5
    Okay, my newbie-ness will come out here big time...

    My main form does contain a sub form in order to fill in all the phone numbers. But I have other forms that act in the same manner, like "nicknames"...a single person could have many. If I fill in all the data in my form except the phone number, then the entire record does not show up again if I reopen the form...but it's in the table. But if I have the phone number and neglect all other data that goes in other tables (through other sub forms), then the record stays when I reopen the form.

    So somehow the phonenumber table and subform are doing something different to my main form than the other sub forms do. What have I setup wrong?

  4. #4
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    What is the Record Source property for the main form?

  5. #5
    turnertj is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    5
    That definately appears to be the issue...thanks! But what does it mean? It has my PhoneNumber table and column in there, along with my main Table.*

  6. #6
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    If you make a query that involves the main table and the phone table, by default the results will include only records that are in both tables. For example, if the common field in these tables is ContactID, then by default Contacts that have no phone will not be included in the query results. This is called an inner join. You can change the join type, but in this case, I don't see why you want phone in there at all.

    Make a copy of what is in the Record Source property now (just in case I am misunderstanding something), and then change the Record source to only include fields from the main table. You can actually just change it to the table name if you want.

  7. #7
    turnertj is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2010
    Posts
    5
    That totally did the trick! Thanks so much. I never would have found it without help.

  8. #8
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    ~~!!Yay!!~~

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

Similar Threads

  1. Replies: 0
    Last Post: 03-15-2010, 02:38 AM
  2. Replies: 2
    Last Post: 02-13-2010, 01:54 PM
  3. Entering duplicate data in Form
    By cotri in forum Forms
    Replies: 1
    Last Post: 01-06-2010, 11:45 PM
  4. Question about entering data through form
    By vixtran in forum Database Design
    Replies: 6
    Last Post: 06-16-2009, 07:23 AM
  5. Replies: 2
    Last Post: 03-16-2009, 12:19 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