opening forms base on data

  • Thread starter Thread starter john
  • Start date Start date
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?
 
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.
 
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?


.
 
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?


.
 
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?


.


.
 
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?


.


.
 
Back
Top