I am trying to put a button on a form that when pressed, opens another form related to the ID number of the previous form. (Eg; An Orders form with a button that opens a Customer form to select the customer related to that order.) Therefore, I require the customer form to open up with the order ID which was on display in the order form when I clicked the button.
I have added the button to the form by using the wizard, and when it asks what records to show, I have asked for the two ID fields to be linked (which are also linked by a relationship). However, firstly the button doesn't work as it produces an error saying there is an Ambiguous Name Detected. I can then create a macro to open the form and attach that to the button, and the button will then open the form. But it doesn't link with the order ID. If I am currently in order ID 1, the customer form opens with a order ID 0.
I have tried looking at books and example databases that come with Access and can't see any obvious reasons why I am having problems.
The database I am creating isn't complex in any way at the moment, as this is one of the first databases I have created. I do not know much about Visual Basic code but I feel this is wear the problem may lie.
Hope someone can help.
Thanks in anticipation.
Mark
I have added the button to the form by using the wizard, and when it asks what records to show, I have asked for the two ID fields to be linked (which are also linked by a relationship). However, firstly the button doesn't work as it produces an error saying there is an Ambiguous Name Detected. I can then create a macro to open the form and attach that to the button, and the button will then open the form. But it doesn't link with the order ID. If I am currently in order ID 1, the customer form opens with a order ID 0.
I have tried looking at books and example databases that come with Access and can't see any obvious reasons why I am having problems.
The database I am creating isn't complex in any way at the moment, as this is one of the first databases I have created. I do not know much about Visual Basic code but I feel this is wear the problem may lie.
Hope someone can help.
Thanks in anticipation.
Mark