Expanding memo field to larger form | | |
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) | | | | re: Expanding memo field to larger form
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" <siobhan.perricone@nostatespam.vt.us> wrote in message
news:vol7pv4nsdv87njbbmreqokajmv3l82ka1@4ax.com...[color=blue]
> 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)[/color] | | | | re: Expanding memo field to larger form
On Mon, 20 Oct 2003 22:19:18 GMT, "Larry Linson"
<bouncer@localhost.not> wrote:
[color=blue]
>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.[/color]
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! :)
[color=blue]
>"Siobhan Perricone" <siobhan.perricone@nostatespam.vt.us> wrote in message
>news:vol7pv4nsdv87njbbmreqokajmv3l82ka1@4ax.com.. .[color=green]
>> 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)[/color]
>[/color]
--
Siobhan Perricone
Systems Developer
Vermont Agency of Natural Resources
(my comments are my own, not my employers) |  | Similar Microsoft Access / VBA bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,295 network members.
|