Access 2007 Problem setting ControlSource



I have a problem with an Access 2007 form setting the control source of an
HTML control and displaying it in the form. The Form is bound to a table
which contains the memo fields mem1HTML...mem8HTML which contain HTML. The
form contains a tab control (with 8 pages) and an HTML Editor control (nBit)
called WebBrowser. I want the contents of the memo fields to be displayed in
the HTML editor by clicking on the respective tab pages. I use the On Change
event of the HTML editor control to do this. (see below). It works fine in
Access 2000.

Private Sub TabPageElements_Change()
Dim tbcTab As Control
Dim strTabValue As String, strContent As String

DoCmd.RunCommand acCmdSaveRecord
Set tbcTab = Me.TabPageElements
With Me
strTabValue = CStr(tbcTab.Value + 1)
strLastField = "mem" & strTabValue & "HTML"
strContent = Me(strLastField)
.txtCurrentField = strLastField
.webBrowser.ControlSource = strLastField
End With
Set tbcTab = Nothing
End Sub

I do not get any error messages but the content of the memo fields do not
show in the HTML Editor (webBrowser)

Does anyone have any idea how to solve this problem?

Thanks in advance.

Joe Santamaria

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question