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

Zoom RTF2

P: 4
Hello

I'm sure I do something wrong, but I don't know what ...

In Form 1 I painted the RTF2 control and bound it to a memo field. Entering and changing data therein works fine.
Now, based on some space limitations, I want to reduce the control's size and add a zoom button nearby, which opens Form2 with an unbound RTF2 control.

What I want is simple.
- Having still the possibility to see, enter and update text in RFT2 on Form1
- Activating the Zoom button to transfer all current data from the bound RTF2 in Form 1 to the unbound RTF2 in Form2
- See, enter and change data in RTF2 in Form2
- Accept on Form2 transfers data back to RTF2 in Form1
- Only in Form1 the data are stored in DB.

What I did:
in Form 1, cmdZoomButton_Click():
--snip--
DoCmd.OpenForm "Form2", , , , , acDialog, me!rtfField
--snip--

in Form2, Form_Open
--snip--
Me!rtfDummyField = Me.OpenArgs
--snip--
Error: The setting you entered isn't valid for this property!

Currently I'm Lost.

Anyone an idea ?

Thx in advance
Wolfgang

P.S. WXP, Access 2003
Oct 12 '06 #1
Share this Question
Share on Google+
4 Replies


100+
P: 143
Your OpenArgs is in the wrong event procedure.

This is behind a command button on your input form

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "YourInputFormName"
DoCmd.OpenForm stDocName, , , , , , Me.YourTextControl

This is in the On Load event of the second form.

Private Sub Form_Load()

Me.YourTextControl = Me.OpenArgs

End Sub
Oct 12 '06 #2

P: 4
Your OpenArgs is in the wrong event procedure.
...

Private Sub Form_Load()

Me.YourTextControl = Me.OpenArgs

End Sub
Sounds nice.
Unfortunatly it doesn't work.
Same error message as in the Form_Open event.

Wolfgang
Oct 12 '06 #3

100+
P: 143
What code do you have in the On Open event?
Oct 13 '06 #4

P: 4
What code do you have in the On Open event?
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer) ' zoom form
  2. End Sub
  3.  
  4. Private Sub Form_Load()    ' zoom form
  5. ' assign open arguments to fields
  6.   Me.rtfComment = Me.OpenArgs
  7. End Sub
  8.  
just moved the content from Form_Open to Form_Load. That's all.

And the zoom form is quite simple.
Just a big RTF2 control, unbound, in the Detail area and an accept button in the footer. That's it.
But I got the error in the open Arguments assignment.

Wolfgang
Oct 13 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.