A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

opening forms base on data



 
 
Thread Tools Display Modes
  #1  
Old February 5th, 2010, 06:51 PM posted to microsoft.public.access.gettingstarted
John
external usenet poster
 
Posts: 2,649
Default opening forms base on data

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?
  #2  
Old February 5th, 2010, 07:30 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default opening forms base on data

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" wrote in message
news
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?



  #3  
Old February 5th, 2010, 08:57 PM posted to microsoft.public.access.gettingstarted
John
external usenet poster
 
Posts: 2,649
Default opening forms base on data

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

"Jeff Boyce" wrote:

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" wrote in message
news
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?



.

  #4  
Old February 5th, 2010, 11:30 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default opening forms base on data

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" wrote in message
news
Thanks for the info but I'm a novice at best. How do you create the
events.

"Jeff Boyce" wrote:

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" wrote in message
news
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?



.



  #5  
Old February 9th, 2010, 08:21 PM posted to microsoft.public.access.gettingstarted
John
external usenet poster
 
Posts: 2,649
Default opening forms base on data

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" wrote:

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" wrote in message
news
Thanks for the info but I'm a novice at best. How do you create the
events.

"Jeff Boyce" wrote:

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" wrote in message
news 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?


.



.

  #6  
Old February 9th, 2010, 09:23 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default opening forms base on data

Open Access HELP 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" wrote in message
...
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" wrote:

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" wrote in message
news
Thanks for the info but I'm a novice at best. How do you create the
events.

"Jeff Boyce" wrote:

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" wrote in message
news 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?


.



.



  #7  
Old February 10th, 2010, 11:39 PM posted to microsoft.public.access.gettingstarted
KenSheridan via AccessMonster.com
external usenet poster
 
Posts: 1,610
Default opening forms base on data

Normally I'd expect your second option to happen automatically. Check the
second form's AllowAdditions property. If its False (No) change it to True
(Yes). That way you should find that if there is no matching vendor in the
second form's underlying table or query the second form will open at a blank
new record.

The other possibility is that the second form's underlying recordset is not
updatable (i.e. it’s a query which for some reason is not updatable), in
which case it wouldn't allow you to enter a new record. If so you'd need to
open a separate form based on an updatable recordset if there is no match,
but you'd need to use code for this rather than a macro.

Ken Sheridan
Stafford, England

john wrote:
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?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...arted/201002/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.