Hi there.

I've got two forms (form1.frm and frmoptions.frm.) The first form contains a variable (multip = 2.) When I click on the first form let's say I want to see that variable in the second form's command button's caption. This doesn't work. All I get is a blank command button (without the variable as the caption.)

I've declared the variable as 'Public' in the General / Declarations section (in the first form.) And I use the code below to see the second form...


Any suggestions? Thanks :)

Re: Problem with two forms 80 80

in load event of frmoptions have
commandbuttonname.caption = Form1.multip

Re: Problem with two forms 80 80

Thanks plusplus.

I didn't think to use the "form1" part of the code, because I thought this would be automatically known by vb due to the fact that it is a Public variable.

Nice one, thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.