>>I had the function at the top of the program - sorry about that.
>>
>>However, I get an error on this line:
>>tcWindowName = Lower(tcWindowName)
>>Error: Function argument value, type, or count is invalid.
>>
>>Since the current Form (form A) is a form set - could that have something to do with the error?
>
>lower() operates on character values. As error message says tcWindowName is not a string. Place this before that line to check (or suspend and invoke debugger what tcWindowName is) :
>
>messagebox(type('tcWindowName')+'/'+trans(tcWindowName))
>
>Cetin
BTW with a formset (formset is not a good idea IMHO) it might need a diffrent code. ie:
thisformset.formA.hide()
thisformset.formA.show()
PS: No checks on exitence and name.
Cetin