access vba - Using code to identify which form is currently open -


I am creating a database with many variations in it, where often I want to "zoom in box" to open a zoom Record is required and let the user enter long lines of text in a 'memo' field. At the moment, due to my limited VBA programming knowledge, I have to be forced to create a new (and similar) zoom look for each field, where I want to zoom in. I am thinking that every time I want to do this, but there is no need to create a new form for a standard 'zoom-in' form, which knows which table / area is being used.

I think you have the same table and just want to change the name of the field, if the table If the name and field have also changed, then we can write down the logic for the same with the sample code.

When you need to know which field to use, there is convenience when opening a form in Microsoft Access VBA, we can pass OpenArgS. It can be used as a route by setting the area zoom to understand OpenArgs. DoCmd.OpenForm "frmZoom" ,,,,,,, "memoField1"

Write code for each desired button when code is clicked

  ' , So that you can use which field to zoom form.  

In the open event of the zoom form, the following code will be

  'Please select to install for the memo field. Case Me.OpenArgs Case "memoField1" Me.tbMemoField1.ControlSource = "memoField1" episode "MemoField2" which needs the field Me.tbMemoField2.ControlSource = "Memorandum 2" and select  

the requirements of the above Replace field names and control names accordingly.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -