Entering data on a form that's record source is a query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jromito
    New Member
    • Oct 2008
    • 2

    #1

    Entering data on a form that's record source is a query

    I cannot enter data on a form I'm using. I'm assuming this is because the record source is a query. Is there a way to allow me to enter data using a query? Thank you.
  • DonRayner
    Recognized Expert Contributor
    • Sep 2008
    • 489

    #2
    Originally posted by jromito
    I cannot enter data on a form I'm using. I'm assuming this is because the record source is a query. Is there a way to allow me to enter data using a query? Thank you.
    You should be able to, here are some things that you could look at

    1. Form opened in acview
    2. Edit lock set in form properties
    3. Poor query design
    4. Key discrepancies in your underlying tables.

    With a little debuging time you should be able to figgure it out. What have you done so far?

    Comment

    • jromito
      New Member
      • Oct 2008
      • 2

      #3
      Originally posted by DonRayner
      You should be able to, here are some things that you could look at

      1. Form opened in acview
      2. Edit lock set in form properties
      3. Poor query design
      4. Key discrepancies in your underlying tables.

      With a little debuging time you should be able to figgure it out. What have you done so far?
      Thank you for your response. This is a simple query so the design should be ok. When you say acview, what do you mean by that? I tried changing the edit lock set to edited record and it still didn't work.

      Comment

      • DonRayner
        Recognized Expert Contributor
        • Sep 2008
        • 489

        #4
        Originally posted by jromito
        Thank you for your response. This is a simple query so the design should be ok. When you say acview, what do you mean by that? I tried changing the edit lock set to edited record and it still didn't work.
        if the form is being opened like this

        Code:
        DoCmd.OpenForm "FormName", , , , acFormReadOnly
        Also it's not the edit lock, I guess I should have been more specific. On the properties setting for the form click on the data tab and check the Allow Edits, Allow Deletions, Allow Additions and Data Entry settings

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          If you run the query on its own, then you can see if the query is updatable by whether or not there is an empty line for adding a new record.

          If there is no line for a new record, then the query is not updatable, and that means the data cannot be updated, whether from a form or otherwise.

          Comment

          • missinglinq
            Recognized Expert Specialist
            • Nov 2006
            • 3533

            #6
            If your query is Read-Only, i.e if you cannot enter data when the query is opened independently of the form, follow this link to Allen Browne’s article explaining the reasons this happens.

            List of reasons why a Microsoft Access query will yield non-editable results.


            Welcome to Bytes!

            Linq ;0)>

            Comment

            Working...