E
evilcowstare via AccessMonster.com
Hi, I am having some trouble using the DoCmd.OpenForm function.
Instead of using the code directly I have been using a Macro to open a form
and then in the where command trying to make the ID on one form go to the
other...
So whichever ID number is on one form, when I run the macro it should open up
another form and in the combo box show the same id number.
I just seem to be having trouble getting it to work, maybe if I say what im
trying to do....
I have a customer table which a form runs off, so you enter new customers and
when you save it it gets given an ID.
On another form I am trying to display the same customer information at the
top of the page, to do this what im planning on doing is having an invisible
combo box which will get and display the same ID from the customers form.
I am then using an AfterUpdate command of CustomerName = Me.CustomerIDCombo.
Column(2)
To then display the bits in seperate text boxes.
The problem I have is that I cant get the CustomerIDCombo on the second form
to pick up the ID no form the 1st Customer Form.
The ID box on the customer form is called "customerID"
The combo box on the next form is called "CustomerIDCombo"
I want "CustomerIDCombo" to gets its selection based on the number that is
shown in "CustomerID"
Im planning on using a button on the 1st customer form to when clicked runs
DoCmd.OpenForm Where etc etc either in code or macro.
Can anybody help me out?
I am new to this so please keep it straight forward if poss )
Thank You for all your help!!!!!!!!!!!!!!
Instead of using the code directly I have been using a Macro to open a form
and then in the where command trying to make the ID on one form go to the
other...
So whichever ID number is on one form, when I run the macro it should open up
another form and in the combo box show the same id number.
I just seem to be having trouble getting it to work, maybe if I say what im
trying to do....
I have a customer table which a form runs off, so you enter new customers and
when you save it it gets given an ID.
On another form I am trying to display the same customer information at the
top of the page, to do this what im planning on doing is having an invisible
combo box which will get and display the same ID from the customers form.
I am then using an AfterUpdate command of CustomerName = Me.CustomerIDCombo.
Column(2)
To then display the bits in seperate text boxes.
The problem I have is that I cant get the CustomerIDCombo on the second form
to pick up the ID no form the 1st Customer Form.
The ID box on the customer form is called "customerID"
The combo box on the next form is called "CustomerIDCombo"
I want "CustomerIDCombo" to gets its selection based on the number that is
shown in "CustomerID"
Im planning on using a button on the 1st customer form to when clicked runs
DoCmd.OpenForm Where etc etc either in code or macro.
Can anybody help me out?
I am new to this so please keep it straight forward if poss )
Thank You for all your help!!!!!!!!!!!!!!