Solved Open Textfield in Zoom (1 Viewer)

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi guys,

not sure if you can do something like that in the first place but what I like to is following.

I have a PopUp form where the user can select or enter Products.
The form is linked to a table and has a ProdInfoField.

As there are just sometimes product Infos needet or need to be entered I would like to keep the popup small and like to open the Info in a seperate Zoom Window to enter Info regarding the product.

Or is there a better way or how do you handle those situations?
Hope this is clearly explained?

Cheers

Albert
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:02
Joined
May 7, 2009
Messages
19,229
you can press Shift-F2 on any textbox on the form and it will bring the Zoom window.
 

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Oh thank you for the Info did not know that!

Cheers!

Can you put that in a Code to so if the usere doppel clicks on the textfield?

That would be kind of nice I think

Cheers
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:02
Joined
May 7, 2009
Messages
19,229
Private Sub Textbox1_DblClick(Cancel As Integer)
DoCmd.RunCommand acCmdZoomBox
End Sub
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:02
Joined
Feb 19, 2002
Messages
43,233
I prefer to teach the user how to open the zoom himself. Do you want to have to add the zoom option to every longish text field?
 

bastanu

AWF VIP
Local time
Today, 14:02
Joined
Apr 13, 2010
Messages
1,402
Have a look at the attached sample that uses a custom pop-up form instead of the built-in zoom window. Works as you mentioned (on double-click).

Cheers,
 

Attachments

  • popEditor.zip
    21.9 KB · Views: 85

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi guys,

many thanks for your reply and sample!

Well their are just one or two textfields so I guess that would be ok to have it via vba.

The sample looks also very interesting and of course also thanks to arnelgp !
I will look into it and see which is the way to go on that one!

Many thanks for all your help!


Cheers
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:02
Joined
May 7, 2009
Messages
19,229
look at that i also have my own custom Zoombox plus Spelling bee.
 

Attachments

  • ZoomBox.accdb
    544 KB · Views: 99

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi Arnelgp,

thanks for your sample!
Much appreciated I will look into it! But the fist look ... looks good :)

Cheers
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:02
Joined
Feb 19, 2002
Messages
43,233
Well their are just one or two textfields so I guess that would be ok to have it via vba.
Now;)

But, if you are going to write code, you might as well use one of the samples provided if you like them better than the default.
 

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi again,

@arnelgp,

I just looked into your code and just spotted some typo I guess.

Code:
'arnelgp
Sub Notepad(ctl As control, CallingForm As Form)
    On Error GoTo Err_Workspace
    CallingForm.Refresh
    'Save any data which may have been entered into memo field
    Set gctlWorkspaceSource = ctl
    If (ctl.Locked) Or (Not ctl.enabled) Or (Not CallingForm.AllowEdits) Then
        DoCmd.OpenForm "Notepad", WindowMode:=acDialog, _
                       OpenArgs:="ReadOnly"
    Else
        DoCmd.OpenForm "Notepad", WindowMode:=acDialog
    End If
    If IsFormLoaded("Notepad") _
       And (Not ctl.Locked) _
       And (ctl.enabled) _
       And (CallingForm.AllowEdits) Then
        gctlWorkspaceSource = Forms.Notepad.txtWorkspace
    End If
    If IsFormLoaded("Notepad") Then
        DoCmd.Close acForm, "Notepd"
    End If
Exit_Workspace:
    Exit Sub
Err_Workspace:
    Select Case Err
    Case 3163    'Too much data for field
        MsgBox "The field is too small to accept the amount " _
              & "of data you attempted to insert. As a result, " _
              & "the operation has been cancelled.", vbExclamation, _
                "Notepad"
        Resume Next
    Case Else
        MsgBox Err.Number & ", " & Err.description
        Resume Exit_Workspace
    End Select
End Sub

The code is running with no problems but just wondering should the "Notepad" be spelled "NotePad"
Or does it not matter?
The form as you had it is called NotePad

Cheers )
 

isladogs

MVP / VIP
Local time
Today, 22:02
Joined
Jan 14, 2017
Messages
18,209
For almost all situations Access isn't concerned about upper/lower case.
However there is a typo in the spelling of Notepad in the line DoCmd.Close acForm . . .which means that line of code will fail
 
Last edited:

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi isladogs,

Thanks for clearify that!
Thought so that it would not matter but just wanted to make it clear.

Cheers!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:02
Joined
May 7, 2009
Messages
19,229
there is misspelling on this part, change it appropriately:
Code:
    If IsFormLoaded("Notepad") Then
        DoCmd.Close acForm, "Notepd"      '<-- wrong spelling is wrong.
    End If
 

silentwolf

Active member
Local time
Today, 14:02
Joined
Jun 12, 2009
Messages
559
Hi arnelgp,

yes I thought so all good I will change it to suit!

Cheers
 

Users who are viewing this thread

Top Bottom