Functions in form

Z

Zera

I have made an invoice using a form, and have it nearly completed, I have two
functions that I don't know how to create. One is simple, I need an automatic
number created for each separate invoice printed. And the hard one is I need
a function that will give me customer information (name, address, city,
state, zip) when I type in a customer code like mcg = mcgregor, 123 fake st.,
d-town, WA 99999. I have literally looked everywhere on how to do this, even
forums.
 
A

Amy Blankenship

Zera said:
I have made an invoice using a form, and have it nearly completed, I have
two
functions that I don't know how to create. One is simple, I need an
automatic
number created for each separate invoice printed.

Why only invoices printed? I would think it would make sense to give a
unique identifier for _all_ invoices when they are created, not just the
ones you print. Have you looked at just using an Autonumber field?
And the hard one is I need
a function that will give me customer information (name, address, city,
state, zip) when I type in a customer code like mcg = mcgregor, 123 fake
st.,
d-town, WA 99999. I have literally looked everywhere on how to do this,
even
forums.

Just do a join to the query that contains that information.

HTH;

Amy
 
B

Bob Quintal

I have made an invoice using a form, and have it nearly completed,
I have two functions that I don't know how to create. One is
simple, I need an automatic number created for each separate
invoice printed. And the hard one is I need a function that will
give me customer information (name, address, city, state, zip)
when I type in a customer code like mcg = mcgregor, 123 fake st.,
d-town, WA 99999. I have literally looked everywhere on how to do
this, even forums.

You don't really need functions for either of those pieces of data.

For the first, just use an autonumber field in the underlying table.
If you need something more sophisticated, write back.

For the second, change your textbox to a combobox. The wizard will
guide you through the process, make the row source a query that
returns name, address, city, state, zip

In the After_Update of the combobox, you populate your fields with a
statement that sets the relevant textbox to the column in the
combobox.


me!text9 = me.combo2.column(1) 'address, 2nd column
me!text11 = me.combo2.column(2) 'city, 3rd column
me!text15 = me.combo2.column(4) 'city, 5th column

Change the names of the controls to suit. BTW name is a reserved
word in access, you will eventually have a conflict with your field
named name and an an access property, so please change it to
something like custname.
 

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