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  

look up a value for a table if it isn't there creat a new row



 
 
Thread Tools Display Modes
  #1  
Old July 14th, 2009, 05:03 PM posted to microsoft.public.access.gettingstarted
Jules
external usenet poster
 
Posts: 187
Default look up a value for a table if it isn't there creat a new row

Hi,

I'm not used to Access at all. I have 2 tables - Customer and appt. I want
to be able to enter a Customer Number in a form and if the customer number
exists, show the customer info on the form and related appt details on the
subform. If I enter a customer ID that does not exist I want access to allow
me to create a new record of customer info. How do I do this?
  #2  
Old July 14th, 2009, 07:29 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default look up a value for a table if it isn't there creat a new row

Jules

What type of control are you using on the form to enter the CustomerID? A
combobox? A textbox?

A combobox gives you a NotInList event you can use to add a new record.

By the way, most folks don't memorize "customerIDs". Customer names are
much easier to remember. Perhaps you want to reconsider forcing your users
to enter customerIDs?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jules" wrote in message
...
Hi,

I'm not used to Access at all. I have 2 tables - Customer and appt. I
want
to be able to enter a Customer Number in a form and if the customer number
exists, show the customer info on the form and related appt details on the
subform. If I enter a customer ID that does not exist I want access to
allow
me to create a new record of customer info. How do I do this?



  #3  
Old July 14th, 2009, 09:03 PM posted to microsoft.public.access.gettingstarted
Jules
external usenet poster
 
Posts: 187
Default look up a value for a table if it isn't there creat a new row

Hi

Thanks for your help. I have tried a combo box but don't really know how it
works. I'd imagined having a field to type the ID number (has to be used)
and if that customer existed, the other fields being populated with relevant
info. If not fields blank for filling in.

Am I really slow, I can't find anything in my 'dummies' book that makes
sense??

"Jeff Boyce" wrote:

Jules

What type of control are you using on the form to enter the CustomerID? A
combobox? A textbox?

A combobox gives you a NotInList event you can use to add a new record.

By the way, most folks don't memorize "customerIDs". Customer names are
much easier to remember. Perhaps you want to reconsider forcing your users
to enter customerIDs?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jules" wrote in message
...
Hi,

I'm not used to Access at all. I have 2 tables - Customer and appt. I
want
to be able to enter a Customer Number in a form and if the customer number
exists, show the customer info on the form and related appt details on the
subform. If I enter a customer ID that does not exist I want access to
allow
me to create a new record of customer info. How do I do this?




  #4  
Old July 14th, 2009, 11:18 PM posted to microsoft.public.access.gettingstarted
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default look up a value for a table if it isn't there creat a new row

Try posting in the .forms newsgroup, asking for ideas about using a
combobox.

Either way, whether you have users enter an ID, then write the code to look
for matching IDs, or whether you use a combobox and have the users select
the customer they're after, you are going to need to learn more about using
Access. It can be a bit of a steep learning curve!

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jules" wrote in message
news
Hi

Thanks for your help. I have tried a combo box but don't really know how
it
works. I'd imagined having a field to type the ID number (has to be used)
and if that customer existed, the other fields being populated with
relevant
info. If not fields blank for filling in.

Am I really slow, I can't find anything in my 'dummies' book that makes
sense??

"Jeff Boyce" wrote:

Jules

What type of control are you using on the form to enter the CustomerID?
A
combobox? A textbox?

A combobox gives you a NotInList event you can use to add a new record.

By the way, most folks don't memorize "customerIDs". Customer names are
much easier to remember. Perhaps you want to reconsider forcing your
users
to enter customerIDs?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jules" wrote in message
...
Hi,

I'm not used to Access at all. I have 2 tables - Customer and appt. I
want
to be able to enter a Customer Number in a form and if the customer
number
exists, show the customer info on the form and related appt details on
the
subform. If I enter a customer ID that does not exist I want access to
allow
me to create a new record of customer info. How do I do this?






 




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 12:20 PM.


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