gbnorton
asked on
From based on a query that opens to a new blank record
Access 2007
I have a form that is based on a query. It is the first time I've used this method. But it does not allow for creating new records.
When I create a form based on a table, in the On Load property I use this
Private Sub Form_Load()
Me.DataEntry = True
DoCmd.Maximize
End Sub
to open with a new blank record.
Is there something different required when a form is based on a query?
Thanks,
Brooks
I have a form that is based on a query. It is the first time I've used this method. But it does not allow for creating new records.
When I create a form based on a table, in the On Load property I use this
Private Sub Form_Load()
Me.DataEntry = True
DoCmd.Maximize
End Sub
to open with a new blank record.
Is there something different required when a form is based on a query?
Thanks,
Brooks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ran the query by itself and could not add or edit a record.
In the query I have two expressions. One for calculating a total and one for an average.
From Allen Browne's article that seems the reason.
It is a single table.
In the query I have two expressions. One for calculating a total and one for an average.
From Allen Browne's article that seems the reason.
It is a single table.
"In the query I have two expressions."
Is this a Group By query then? If so, that is ... the reason. No can do.
mx
Is this a Group By query then? If so, that is ... the reason. No can do.
mx
gbnorton, as mx stated you can not use a Totaling query and it be updatable. It may be possible to get eh total use want by using a sub query and the query still be updatable.
For example: If you havea look up table then you can use a combo box to display the related data without the need to add the look up table to the form's query.
If you have a one-to-many relationship then I would not add the table to the form's query. I would use a sub form for the many side's table
This might also help:
Why is my query read-only?