Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002

    Unanswered: Re: Why is the subform opens to read-only?

    Hi everyone,

    I have a subform base on a table I created in the subform's open event. But the subform is open to read-only.
    I set the subform's source object to the tblTemp_inspec it still won't edit. The Problem must be in creating the tblTemp_inspec. But I thought the default setting is read/write and I am not sure how to modify the code.

    This is my code:
    Public Sub Form_Open(Cancel As Integer)
    str = "Create Table tblTmp_inspec(bag_num integer, quantity integer, inspection_type integer, partial bit, complete bit)"
    CurrentProject.Connection.Execute str
    'if a condition is true
    'calls stored procedure insert a record in tblTmp_inspec
    str = "Select tblTmp_inspec.bag_num,...."
    Me.RecordSource = str

    end sub

    I'm using Access2000 and SQL Server BE
    The form's lock property is set to 'No'
    I just can't understand why is the form is open to read-only.

    Thank you for your input.

  2. #2
    Join Date
    Feb 2004
    str = "Select tblTmp_inspec.bag_num,...."
    Me.RecordSource = str

    Copy your query string to the query wizard and check it to see if you have an editable datasource. You may have to simplify your data source query to edit the records.


  3. #3
    Join Date
    May 2002

    Re: Why is the subform opens to read-only

    Hi Bill,

    Thanks for your reply. You're right. There is a problem in updating the records in the view I created in SQL Server.

    Would you know what this message means:
    Insufficient key column information for updating of refreshing.

    The columns I tried updating store bit data type.
    These are columns
    bag_num(int), quantity(int), desc(char), partial(bit), complete(bit)'

    The first three columns are populated thru open event of the subform. The last two columns are check boxes. I don't need them to be saved I just want to be able to check those boxes but these check boxes are not working in the subform. All the fields are bound in the subform.

    I just can't understand why these check boxes are not working??

    I would appreciate any suggestions.

    Thank you.

Posting Permissions

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