Is there a way of opening a form in another database? I'm thinking of having a some kind of button on one form that links to another form in another database but I don't know what code i should use.
Thanks, but my knowledge of VBA is limited so where do I specify the form to open and the database? How do I make this a button?
Larry Larsen
Oct 15 2004, 03:33 AM
Hi It's a function and should be placed in a module, be careful not to use the same name for the module as the function. The function can then be called from behind a command button: eg: Call fOpenRemoteForm("DBPath/Name.mdb","FormName",Optional intView As Variant) As Boolean
wesley
Oct 15 2004, 06:23 AM
I'm having trouble getting this function to work. Can the path and the name of the form have spaces in? I get syntax errors when I call the command:
CODE
Call fOpenRemoteForm("H:\Exams\Special Circs\Special Circs.mdb","Students Frm") As Boolean
Larry Larsen
Oct 15 2004, 06:30 AM
Hi LOL.. I dont know I don't have "spaces" in my db/form names.. Try placing a bracket around them..eg: Call fOpenRemoteForm("H:\Exams\[Special Circs]\[Special Circs.mdb]","[Students Frm]") As Boolean HTH's
jhardy66
Oct 15 2004, 08:46 AM
You could also set the File Path and the File Name into Strings, then put the string name into the fOpenRemoteForm call. Just another suggestion.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.