awalker2009
New Member
- Joined
- Jun 17, 2014
- Messages
- 6
Hello,
I have a problem with 2 related forms in a database I'm building, where a macro is not opening the correct record. . The database hold details of service providers, who have contracts with our organisation.
One form holds the basic details of the provider (Name, reference, type of organisation). the other has the contact details. There is a button which should take the user to the second form which will have the contact details for that provider. However, whenever I click the button, the form opens for a different provider (one that's the first in the underlying table).
The macro I am using is as follows:
Close Window
Open Form
View: Form
Filter Name:
Where Condition = ="[Provider Name]=" & "'" & [cbofrmProviderBasicDetailsProviderName] & "'"
Data Mode:
Window Mode: Normal
where:
frmProviderBasicDetails =starting form
frmProviderGeneralContact = related form to be opened
[Provider Name] = field name of provider in related form
[cbofrmProviderBasicDetailsProviderName] = name of box containing provider name in originating form
Thanks
I have a problem with 2 related forms in a database I'm building, where a macro is not opening the correct record. . The database hold details of service providers, who have contracts with our organisation.
One form holds the basic details of the provider (Name, reference, type of organisation). the other has the contact details. There is a button which should take the user to the second form which will have the contact details for that provider. However, whenever I click the button, the form opens for a different provider (one that's the first in the underlying table).
The macro I am using is as follows:
Close Window
Object Type: Form
Object Name: frmProviderBasicDetails
Save: NoOpen Form
Form Name: frmProviderGeneralContactView: Form
Filter Name:
Where Condition = ="[Provider Name]=" & "'" & [cbofrmProviderBasicDetailsProviderName] & "'"
Data Mode:
Window Mode: Normal
where:
frmProviderBasicDetails =starting form
frmProviderGeneralContact = related form to be opened
[Provider Name] = field name of provider in related form
[cbofrmProviderBasicDetailsProviderName] = name of box containing provider name in originating form
Thanks