opening forms base on data

J

john

i'm using a macro to open a form with information that equals the information
in the form i'm in.
Macro: Where Condition [VendorName]=[Forms]![frmInventoryOrder]![VendorName]

This enables me to use the first form as a "look up" form. What I would
like to do is if there is no matching data in the 2nd form that either:
1. msgbox would appear stating "customer does not exit would you like to
add" OR
2. simply just open a blank form in the data entry mode.

Is this possible?
 
J

Jeff Boyce

John

Here's an alternate approach to consider ...

You can use an unbound combobox in the header of your form to let the user
pick the "customer".

You can use that combobox's AfterUpdate event to load the form with the
selected customer's data.

You can use that combobox's NotInList event to see if the user wishes to add
a new customer.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

john

Thanks for the info but I'm a novice at best. How do you create the events.

Jeff Boyce said:
John

Here's an alternate approach to consider ...

You can use an unbound combobox in the header of your form to let the user
pick the "customer".

You can use that combobox's AfterUpdate event to load the form with the
selected customer's data.

You can use that combobox's NotInList event to see if the user wishes to add
a new customer.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


john said:
i'm using a macro to open a form with information that equals the
information
in the form i'm in.
Macro: Where Condition
[VendorName]=[Forms]![frmInventoryOrder]![VendorName]

This enables me to use the first form as a "look up" form. What I would
like to do is if there is no matching data in the 2nd form that either:
1. msgbox would appear stating "customer does not exit would you like to
add" OR
2. simply just open a blank form in the data entry mode.

Is this possible?


.
 
J

Jeff Boyce

The events are already tied to the controls.

Open the form in design view. Highlight a control. Open the Properties
window and look for the events.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

john said:
Thanks for the info but I'm a novice at best. How do you create the
events.

Jeff Boyce said:
John

Here's an alternate approach to consider ...

You can use an unbound combobox in the header of your form to let the
user
pick the "customer".

You can use that combobox's AfterUpdate event to load the form with the
selected customer's data.

You can use that combobox's NotInList event to see if the user wishes to
add
a new customer.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


john said:
i'm using a macro to open a form with information that equals the
information
in the form i'm in.
Macro: Where Condition
[VendorName]=[Forms]![frmInventoryOrder]![VendorName]

This enables me to use the first form as a "look up" form. What I
would
like to do is if there is no matching data in the 2nd form that either:
1. msgbox would appear stating "customer does not exit would you like
to
add" OR
2. simply just open a blank form in the data entry mode.

Is this possible?


.
 
J

john

I can create the macro the open the form where the data matches. In Events
under "after updates" I enter the macro name. This works when the data
matches but I'm not sure what to enter in the "Not on List" property.

Jeff Boyce said:
The events are already tied to the controls.

Open the form in design view. Highlight a control. Open the Properties
window and look for the events.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

john said:
Thanks for the info but I'm a novice at best. How do you create the
events.

Jeff Boyce said:
John

Here's an alternate approach to consider ...

You can use an unbound combobox in the header of your form to let the
user
pick the "customer".

You can use that combobox's AfterUpdate event to load the form with the
selected customer's data.

You can use that combobox's NotInList event to see if the user wishes to
add
a new customer.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


i'm using a macro to open a form with information that equals the
information
in the form i'm in.
Macro: Where Condition
[VendorName]=[Forms]![frmInventoryOrder]![VendorName]

This enables me to use the first form as a "look up" form. What I
would
like to do is if there is no matching data in the 2nd form that either:
1. msgbox would appear stating "customer does not exit would you like
to
add" OR
2. simply just open a blank form in the data entry mode.

Is this possible?


.


.
 
J

Jeff Boyce

Open Access HELP re: NotInList and take a look at the examples.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

john said:
I can create the macro the open the form where the data matches. In Events
under "after updates" I enter the macro name. This works when the data
matches but I'm not sure what to enter in the "Not on List" property.

Jeff Boyce said:
The events are already tied to the controls.

Open the form in design view. Highlight a control. Open the Properties
window and look for the events.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

john said:
Thanks for the info but I'm a novice at best. How do you create the
events.

:

John

Here's an alternate approach to consider ...

You can use an unbound combobox in the header of your form to let the
user
pick the "customer".

You can use that combobox's AfterUpdate event to load the form with
the
selected customer's data.

You can use that combobox's NotInList event to see if the user wishes
to
add
a new customer.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services
mentioned
in this post. Mention and/or description of a product or service
herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with
no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


i'm using a macro to open a form with information that equals the
information
in the form i'm in.
Macro: Where Condition
[VendorName]=[Forms]![frmInventoryOrder]![VendorName]

This enables me to use the first form as a "look up" form. What I
would
like to do is if there is no matching data in the 2nd form that
either:
1. msgbox would appear stating "customer does not exit would you
like
to
add" OR
2. simply just open a blank form in the data entry mode.

Is this possible?


.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top