jleval
asked on
Send A variable from another program(C#) to my database
The database we are using is a part a different program that was initialy created using C#. Within our C# program is a method that allows the user to click a button that opens access, and allows the user to go to a particular form. Here is the method we are using
We understand that the following allows the user to go to a specific record:
Within the application, when the current record is selected, I believe we will be able to pass the part number to the Where Condition.
Our problem is that our original access database has a main form and a button that sends you back to the main form once you are finished with the current form you are using.
What we are trying to do is pass a bool to the form so that when the C# program accesses it, certain attributes within the form are changed. Instead of having the button return to main show, we want another button to take its place, i.e, Close Form. There are some other things we would like to do as well.
How could we pass a variable to the form so that we can condition the form to behave accordingly. Your help would be grately appreciated
public void OpenCutterSpecsForm(string partNo)
{
if (accessOpen)
{
try
{
oAccess.DoCmd.OpenForm(
"frmCutterSpecs", //FormName
Access.AcFormView.acNormal, //View
Type.Missing, Type.Missing, //FilterName and Wherecondition
Access.AcFormOpenDataMode.acFormPropertySettings,
Access.AcWindowMode.acDialog,
partNo);
}
catch (Exception ex)
{
MessageBox.Show("Error accessing Access Form: " + ex.Message);
}
}
}
We understand that the following allows the user to go to a specific record:
Type.Missing, Type.Missing, //FilterName and Wherecondition
Within the application, when the current record is selected, I believe we will be able to pass the part number to the Where Condition.
Our problem is that our original access database has a main form and a button that sends you back to the main form once you are finished with the current form you are using.
What we are trying to do is pass a bool to the form so that when the C# program accesses it, certain attributes within the form are changed. Instead of having the button return to main show, we want another button to take its place, i.e, Close Form. There are some other things we would like to do as well.
How could we pass a variable to the form so that we can condition the form to behave accordingly. Your help would be grately appreciated
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
wasn't much of an explination
ASKER