W
wrldruler
A user is in Database A. They open project #52. They then hit a
button. I need it to:
(1) Open a second Database B -- I got this working with:
.OpenCurrentDatabase constrDBName
(2) Open a specifc form in DB B -- I got this working with:
appAccess.DoCmd.OpenForm "frm_test"
(3) Select specific record #52 on "frm_test". The problem is that a
simple Filter *won't* work because I need to call a function so that a
half dozen variables can be set, do some null checks, etc
I need it to run this function: Open_Project(52) and pass the 52
Project_ID variable. I can use .DoCmd.RunMacro, to run a RunCode
command, to call my function. But I can't figure out how to pass 52 to
a Macro.
Or I need it to open the form, select #52 in a Listbox called
Me.List_Projects, then run Open_Project(). The function will go to the
Listbox to know which Project ID to select. But I can't figure out how
to select #52 in a Listbox via Automation.
Summary: How do I use automation to either call a function in another
database and pass it a variable, or how do I pass a variable via
DoCmd.RunMacro, or how do I use automation to select a specific record
in a Listbox?
Thanks,
Chris
button. I need it to:
(1) Open a second Database B -- I got this working with:
.OpenCurrentDatabase constrDBName
(2) Open a specifc form in DB B -- I got this working with:
appAccess.DoCmd.OpenForm "frm_test"
(3) Select specific record #52 on "frm_test". The problem is that a
simple Filter *won't* work because I need to call a function so that a
half dozen variables can be set, do some null checks, etc
I need it to run this function: Open_Project(52) and pass the 52
Project_ID variable. I can use .DoCmd.RunMacro, to run a RunCode
command, to call my function. But I can't figure out how to pass 52 to
a Macro.
Or I need it to open the form, select #52 in a Listbox called
Me.List_Projects, then run Open_Project(). The function will go to the
Listbox to know which Project ID to select. But I can't figure out how
to select #52 in a Listbox via Automation.
Summary: How do I use automation to either call a function in another
database and pass it a variable, or how do I pass a variable via
DoCmd.RunMacro, or how do I use automation to select a specific record
in a Listbox?
Thanks,
Chris