By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Expanding memo field to larger form

P: n/a
I have an Access adp linked to an SQL db that's tracking tasks. On the
primary data entry form, there's a fair whack of info, so the memo
field for entering details about the task to be completed is
relatively small. I was trying to place a button on the form that,
when clicked, would open another form with just the contents of the
current task details in it. I used the button wizard in forms design
to create it, as it seemed to do what I wanted it to, but I'm getting
an error.

Here is the code the wizard created for the button:

Private Sub cmdExpandDetails_Click()
On Error GoTo Err_cmdExpandDetails_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmTaskDetailsExpanded"

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

Exit_cmdExpandDetails_Click:
Exit Sub

Err_cmdExpandDetails_Click:
MsgBox Err.Description
Resume Exit_cmdExpandDetails_Click

End Sub

Here is the error I get when I click the button:
There was a problem accessing a property or method of the OLE object.

I've tried doing a newsgroup google on this, but none of the threads
I'm turning up seem to have a fix detailed, though I could be missing
something. Anyway, thanks for any help you can give me. :)

--
Siobhan Perricone
Systems Developer
Vermont Agency of Natural Resources
(my comments are my own, not my employers)
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
My first guess would be that you have a Field named "TaskDetails" in the
Table/Query and also a Control on your form bound to that Field, with the
same name. Try renaming your Control to txtTaskDetails, changing the code to
reflect that, and see if that solves the problem.

Larry Linson
Microsoft Access MVP
"Siobhan Perricone" <si***************@nostatespam.vt.us> wrote in message
news:vo********************************@4ax.com...
I have an Access adp linked to an SQL db that's tracking tasks. On the
primary data entry form, there's a fair whack of info, so the memo
field for entering details about the task to be completed is
relatively small. I was trying to place a button on the form that,
when clicked, would open another form with just the contents of the
current task details in it. I used the button wizard in forms design
to create it, as it seemed to do what I wanted it to, but I'm getting
an error.

Here is the code the wizard created for the button:

Private Sub cmdExpandDetails_Click()
On Error GoTo Err_cmdExpandDetails_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmTaskDetailsExpanded"

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

Exit_cmdExpandDetails_Click:
Exit Sub

Err_cmdExpandDetails_Click:
MsgBox Err.Description
Resume Exit_cmdExpandDetails_Click

End Sub

Here is the error I get when I click the button:
There was a problem accessing a property or method of the OLE object.

I've tried doing a newsgroup google on this, but none of the threads
I'm turning up seem to have a fix detailed, though I could be missing
something. Anyway, thanks for any help you can give me. :)

--
Siobhan Perricone
Systems Developer
Vermont Agency of Natural Resources
(my comments are my own, not my employers)

Nov 12 '05 #2

P: n/a
On Mon, 20 Oct 2003 22:19:18 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:
My first guess would be that you have a Field named "TaskDetails" in the
Table/Query and also a Control on your form bound to that Field, with the
same name. Try renaming your Control to txtTaskDetails, changing the code to
reflect that, and see if that solves the problem.

Hrm, didn't change a thing. Maybe the statement being plonked in for
the openform command won't work in SQL. I'll pound on that for a
while. Thanks for the try! :)
"Siobhan Perricone" <si***************@nostatespam.vt.us> wrote in message
news:vo********************************@4ax.com.. .
I have an Access adp linked to an SQL db that's tracking tasks. On the
primary data entry form, there's a fair whack of info, so the memo
field for entering details about the task to be completed is
relatively small. I was trying to place a button on the form that,
when clicked, would open another form with just the contents of the
current task details in it. I used the button wizard in forms design
to create it, as it seemed to do what I wanted it to, but I'm getting
an error.

Here is the code the wizard created for the button:

Private Sub cmdExpandDetails_Click()
On Error GoTo Err_cmdExpandDetails_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmTaskDetailsExpanded"

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

Exit_cmdExpandDetails_Click:
Exit Sub

Err_cmdExpandDetails_Click:
MsgBox Err.Description
Resume Exit_cmdExpandDetails_Click

End Sub

Here is the error I get when I click the button:
There was a problem accessing a property or method of the OLE object.

I've tried doing a newsgroup google on this, but none of the threads
I'm turning up seem to have a fix detailed, though I could be missing
something. Anyway, thanks for any help you can give me. :)

--
Siobhan Perricone
Systems Developer
Vermont Agency of Natural Resources
(my comments are my own, not my employers)

--
Siobhan Perricone
Systems Developer
Vermont Agency of Natural Resources
(my comments are my own, not my employers)
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.