MajP
You've got your good things, and you've got mine.
- Local time
- Today, 17:05
- Joined
- May 21, 2018
- Messages
- 8,533
As far as I can tell, it should do exactly that. You are passing in those values as openargs, you split them out, you assign them to 5 and 6.* In textbox5 of form2 I need the value that the user inserted in textbox1 of form1.
* In textbox6 of form2 I need the value that the user inserted in textbox2 of form1.
If I set the value of the form2 textboxes in the form2 load event I have
The form is looking for open args and I am guessing you opened the form directly. I always put in a check to make sure open args was passedThe error I get now is Run-time error '94': Invalid use of Null, in line Me.textbox5= (cdbl(split(openargs,":")(0)))
Code:
if trim(me.openargs & " ") <> "" then ' check open args passed
if isnumeric(split(me.openargs,":")(0)) then me.textbox5= (cdbl(split(openargs,":")(0))) ' check you passed a number
if isnumeric(split(me.openargs,":")(1)) then Me.textbox6 =(cdbl(split(openargs,":")(1)))
end if
Check my "()" to make sure I counted correctly.