Form Based on a Query help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pfm721
    New Member
    • Jun 2008
    • 8

    Form Based on a Query help

    I have a form that is based on a query. There are multiple tables in the query. the parameter in the query is VetSSN. My problem is that if there is no data in a particular table the form text boxes won't allow me to add the data. For instance user enters a SSN. The four tables that the query returns data for are

    tblVeteran
    tblConsult
    tblDoctor
    tblVendor

    If there is no data in tblDoctor the text boxes on my form are blank. When I go to enter data in the text boxes it won't let me. I am a little confused because if the table has data I can edit the information. I know that I am probably missing something easy here.

    Thanks,
    Patrick.
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    if you have a form based off of a query you will not be able to enter any data. Queries are just used for pulling data from the database, you can't enter data through a query you can only display data.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      Although it is possible for queries to be updatable, not all are. Check the help system for what constitutes an updatable query, or simply run the query natively - if the New record indicator (a *) is there then it's updatable. If not, then it's not.

      Without the SQL of your query it's hard to say any more.

      Comment

      • Stewart Ross
        Recognized Expert Moderator Specialist
        • Feb 2008
        • 2545

        #4
        Hi. To qualify what Stang02 wrote, queries can often be updatable.

        All forms I develop are based on queries, as this allows custom sort orders amongst other benefits. It is true that care has to be taken over which tables the fields are taken from, but in basic multi-table SELECT queries without group totals updatability should not be a problem.

        I suspect myself that the problem relates to a join field not being correctly set - a zero default value not matching any records in the primary table, say, and thus preventing addition of a new record - but without the SQL as NeoPa points out it is difficult to say more.

        -Stewart

        Comment

        Working...