making a form editable, not read only (1 Viewer)

gussy

Registered User.
Local time
Today, 16:51
Joined
Aug 13, 2003
Messages
41
I'm having a bit of a 'mare. I open a form from a button on another form, linking the two ID fields. However, when the new form appears, it is read-only.

I cannot seem to make it editable, which is what I need....I think I've checked all the obvious parameters. Anyway, the code below is what calls up the form:


Private Sub More_Button_Click()
On Error GoTo Err_More_Button_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Vessels Input"

stLinkCriteria = "[ID]=" & Me![ID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Maximize

Exit_More_Button_Click:
Exit Sub

Err_More_Button_Click:
MsgBox Err.Description
Resume Exit_More_Button_Click

End Sub


Is there a line I can stick in to make it editable?

Really appreciate any help on this folks, I've spending hours pondering over it.

Thanks!
 

IMO

Now Known as ___
Local time
Today, 16:51
Joined
Sep 11, 2002
Messages
723
Try ...
Code:
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit

HTH
IMO
 

gussy

Registered User.
Local time
Today, 16:51
Joined
Aug 13, 2003
Messages
41
Thanks...just tried it, but the form still doesn't let me change anything. I think it must be something to do with the form it calls up.

I'm completely baffled, cos all the parameters on that form are set to allow edits, I think. If I call up the form on its own (ie not calling it from the other form) it is perfectly editable....just when it's called up by the other form, it just locks up.

Any bright ideas? I'm really pulling my hair about this one.
:confused: :mad:
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:51
Joined
Feb 19, 2002
Messages
43,486
Sounds like the underlying query is not updatable. Look up updatable queries in help for some details on what makes a query not updatable. Some things are aggregate functions, tables without primary keys, insufficient update permissions.
 

gussy

Registered User.
Local time
Today, 16:51
Joined
Aug 13, 2003
Messages
41
I checked the query's properties etc and it all seems ok.

Essentially I have:

1. One data table

2. One form: Input search criteria. Press button to open:

3. Search results form, that runs the query and displays some of the data for each record. Press button to open:

4. Full data form, that displays all the data for each record.

It is the form in No.4 that is uneditable, although it's editable in No.3....

Totally baffled. I've slept on it, and still can't crack it. I've done a similar database, of the same structure where it works, yet I can't see any difference between the two....

OMG it's driving me insane!!!! :mad: :(
 

Users who are viewing this thread

Top Bottom