Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Textbox population on two forms (passing data from one to another) Question...

1 REPLY 1
Reply
Message 1 of 2
Anonymous
176 Views, 1 Reply

Textbox population on two forms (passing data from one to another) Question...

I have two forms. Each form has a textbox called txtMatlCode...

The goal here is to click on a command button to get the material code from
a list. This is then populated locally. When Exiting the form, the textbox
on the other form is to be populated with the same information. THIS IS
WHAT IS NOT HAPPENING. I have checked everything else with msgboxes, etc,
and the local textbox is being populated correctly.

This relatively simple thing is driving me crazy. Any ideas? And thanks in
advance for the help!



Private Sub cmdMatlCode_Click()
frmPartProp.Hide
frmMatlSearch.Show

End Sub


Private Sub msgDataGrid_Click()
Dim lcol As Integer

R = msgDataGrid.Row

For lcol = msgDataGrid.FixedCols To msgDataGrid.Cols - 1
msgDataGrid.Col = lcol
msgDataGrid.CellBackColor = &H80000002
msgDataGrid.CellForeColor = &HFFFFFF

Next lcol

frmMatlSearch.txtMatlCode.Text = msgDataGrid.TextMatrix(R, 1)

End Sub


Private Sub cmdExit_Click()
Dim MACODE As String

MACODE = frmMatlSearch.txtMatlCode.Text
frmPartProp.Show
frmPartProp.txtMatlCode.Text = MACODE
frmMatlSearch.Hide

End Sub
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

FYI, I can answer my own here!

VB only allows data to be pulled from forms, not pushed to forms!


"Steve Anderson" wrote in message
news:9CD1082E8D9E181809C9B50D49345C0C@in.WebX.maYIadrTaRb...
> I have two forms. Each form has a textbox called txtMatlCode...
>
> The goal here is to click on a command button to get the material code
from
> a list. This is then populated locally. When Exiting the form, the
textbox
> on the other form is to be populated with the same information. THIS IS
> WHAT IS NOT HAPPENING. I have checked everything else with msgboxes, etc,
> and the local textbox is being populated correctly.
>
> This relatively simple thing is driving me crazy. Any ideas? And thanks
in
> advance for the help!
>
>
>
> Private Sub cmdMatlCode_Click()
> frmPartProp.Hide
> frmMatlSearch.Show
>
> End Sub
>
>
> Private Sub msgDataGrid_Click()
> Dim lcol As Integer
>
> R = msgDataGrid.Row
>
> For lcol = msgDataGrid.FixedCols To msgDataGrid.Cols - 1
> msgDataGrid.Col = lcol
> msgDataGrid.CellBackColor = &H80000002
> msgDataGrid.CellForeColor = &HFFFFFF
>
> Next lcol
>
> frmMatlSearch.txtMatlCode.Text = msgDataGrid.TextMatrix(R, 1)
>
> End Sub
>
>
> Private Sub cmdExit_Click()
> Dim MACODE As String
>
> MACODE = frmMatlSearch.txtMatlCode.Text
> frmPartProp.Show
> frmPartProp.txtMatlCode.Text = MACODE
> frmMatlSearch.Hide
>
> End Sub
>
>
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report