Can't edit fields in form (1 Viewer)

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
Database attached.

Please look at my form "frm_Rollback".
I need to be able to edit the fields that are not calculated.
But I can't.
 

Ranman256

Well-known member
Local time
Today, 08:51
Joined
Apr 9, 2015
Messages
4,337
is the query a snapshot?
is the form set to locked?
are the text boxes set to locked?
does the query have joins to other tables? (this can be Read Only)
 

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
db is too big to attach.

any idea why i cant edit the controls in my form?

Thanks!
 

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,643
No database attached, but I'll make an educated guess that your form is based on an unupdateable query.

Forms that need to interact with data (add/edit/delete) should be based on tables, not queries. If you need to do a calculation, have the form do it by placing that calculation as the source of an unbound text box.
 

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
is the query a snapshot?
-I don't know what that means. I am a beginner.

is the form set to locked?
- don't know how to figure this out

are the text boxes set to locked?
- same as above

does the query have joins to other tables? (this can be Read Only)
- same as above
 

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
No database attached, but I'll make an educated guess that your form is based on an unupdateable query.

Forms that need to interact with data (add/edit/delete) should be based on tables, not queries. If you need to do a calculation, have the form do it by placing that calculation as the source of an unbound text box.

Plog,
Is a query always un-updateable?
 

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,643
No, some queries are updatable. The simpler they are (less joined tables, no aggregation), the more likely they are to be updatable. I'm sure there's some rule or explanation as to what makes it unupdatable, but I make my life simple by using this rule---forms that update data should be based on tables.
 

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
I'm recreating the form based on the table.
I can edit everything just fine until I add fields from other tables.
Then it wont let me edit the original fields anymore.
 

plog

Banishment Pending
Local time
Today, 07:51
Joined
May 11, 2011
Messages
11,643
Huh? The Record Source of your form can only be 1 object (table or query). How are you adding other fields from other tables?
 

ZenDiagram

Registered User.
Local time
Today, 09:51
Joined
Aug 28, 2018
Messages
37
in design view, I click "add existing fields" in the upper ribbon.
In the "field list" box I click "show all tables" then select fields from other tables.
I see now that I should only use fields from existing record source only.
ugh.

I guess I could add subreport to my form to show information from other tables that are pertinent.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:51
Joined
Feb 19, 2002
Messages
43,257
Forms that need to interact with data (add/edit/delete) should be based on tables, not queries.
My forms are ALWAYS bound to queries so I can control the rows returned. Many contain multiple joins to other tables or queries. Queries are always updateable unless some part of them is not. There are numerous articles on this topic. the primary reason that queries are not updateable is because they include aggregation or join to a query that aggregates data.

Typically when you join to lookup tables, you should lock the fields on the form to prevent accidental updating. An example is an order entry form. You always want to show Customer information so the form is bound to a query that joins tblOrders to tblCustomers. However, you do NOT want to allow updates to the Customer info from the Order form since it would change the Customer info on the customer table.
 

missinglinq

AWF VIP
Local time
Today, 08:51
Joined
Jun 20, 2003
Messages
6,423
...I can edit everything just fine until I add fields from other tables...


...In the "field list" box I click "show all tables" then select fields from other tables...

When you add Fields form another Table, Access is actually changing your Form's RecordSource from a Table to a Query...which can entail the kind of problem you're facing.

Allen Browne has an excellent article discussing many of the reasons a Query can be Read-Only:

Why is my query read-only?

Linq ;0)>
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:51
Joined
Feb 19, 2002
Messages
43,257
Why do you have two open questions on this topic?
 

Users who are viewing this thread

Top Bottom