INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Updating recordset property in runtime form becomes non editable

Updating recordset property in runtime form becomes non editable

(OP)
The recordset type i have is Dynaset (Inconsistent Updates)

I am updating the recordset in runtime thru below code

Dim strSelect As String
Dim rs1 As DAO.Recordset


strSelect = "SELECT * FROM MAIN"

Set rs1 = CurrentDb.OpenRecordset(strSelect)
Set Me![subform].Recordset = rs1
Set rs1 = Nothing


it works but the controls in the subform become non editable, if i dont update the recordset in runtime and use LinkedMasterfields then the controls are editable

what property do i need to set to make the form editable

I am attaching the property sheet of the subform in the image


RE: Updating recordset property in runtime form becomes non editable

If you simply open the record source as datasheet can you edit records? What is the SQL property of the query?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Updating recordset property in runtime form becomes non editable

(OP)
Its a complex query this one..it joins two tables,is that why?

RE: Updating recordset property in runtime form becomes non editable

You didn't answer either of my two questions. I think I saw your SQL from another thread but I'm not sure.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Updating recordset property in runtime form becomes non editable

(OP)
Yes when i open the subform as a datasheet alone i am able to edit the records,did i answer your question,and the recordsource for that is a query that is set in property sheet and the query has two tables joined

RE: Updating recordset property in runtime form becomes non editable

Is this the SQL of the query and if so, LOAN_NUMBER a primary key in one or both tables?

CODE --> vba

strSelect = "SELECT MAIN.*, MSP_DATA.LAST_PAYMENT_MADE, MSP_DATA.NEXT_PAYMENT_DUE_DATE, MSP_DATA.CURRENT_UPB, MSP_DATA.PROP_VALUE, MSP_DATA.BORROWER_NAME, MSP_DATA.TOTAL_MONTHLY_PAYMENT, MSP_DATA.INVESTOR_ID, MSP_DATA.PROPERTY_ALPHA_STATE_CODE, MSP_DATA.INVESTOR_NAME, MAIN.MULTI_LIEN, MAIN.SECOND_LIEN, MAIN.THIRD_LIEN"
strSelect = strSelect & " FROM MAIN LEFT JOIN MSP_DATA ON MAIN.LOAN_NUMBER = MSP_DATA.LOAN_NUMBER WHERE MAIN.GOLD_NUMBER='" & cmbGoldNumber.Text & "';" 

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

RE: Updating recordset property in runtime form becomes non editable

(OP)
Yes thats the query but i have a different module in the same project which uses a similar query but that fetches way more data

this query above fetches like 500 rows

but the idea is the same

RE: Updating recordset property in runtime form becomes non editable

I would create a test.

  • Take the query used in the subform and use it as the record source in a new form. Does it allow editing?
  • Add this new form as a subform of another new form. Does it allow editing?

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close