Desperate Help with Forms ASAP! Please

  • Thread starter Thread starter ND
  • Start date Start date
N

ND

I have created a startup form for a table that contains
50 customer records. Of course within each record, there
are several fields that only pertain to an individual
customer. There are six different salespeople for these
customers.

I currently have my startup form set up with command
boxes that say, "open new order" and "review existing
order". If the salesperson clicks "open new order", they
currently come to a new order form (record). If the
salesperson clicks "review existing order", the first
order form (record) within the table opens whether it is
that salesperson's customer or not.

Is it possible for me to set up the startup form in a
manner in which when a salesperson clicks on "review
existing order", a box comes up and either has him select
his name from a drop down/list/combo box or key in his
name and only his records show up? If so, will it only
show the first record or will he be able to go to each
successive record simply by clicking "Enter"?

HELP! I know this is alot but this is my first database
I have ever built and I need still a novice with this.
Help!
 
There are a variety of methods to do this. I will use a fairly basic, easy
to setup one to help you.

As you are pleading "novice", can I assume that you used the wizard to
create your command buttons? If so, the following should work for you. If
not, you probably coded the button yourself and can use the gist of this to
modify your code.

Create a ComboBox on your form using the wizard and tell it that you want to
have it show the list of your SalesPeople from the SalesPeople table that I
hope you have made. If not, make one first. If you are storing the
SalesPerson in your invoice with an ID code instead of the name, good for
you, but as a novice, I will approach this assuming you aren't. Go to the
properties of this ComboBox and in the Other section change the control's
name to "cboSalesPerson".

In design view, double-click the ReviewExistingOrders button to bring up the
properties box. Go to the Events tab and you will see the OnClick line has
[Event Procedure] in it. If you click at the grey border at the very right
of this line you will get a little box with three dots ( an ellipse ) on it.
Click on this and it will take you into the world of VBA coding and you will
see the code that the wizard put in for you to open your form.

There is a line that says...

Dim LinkCriteria As String

This is reserving an opportunity for you to use it to specify criteria when
you open your form. We will do that by assigning this criteria to the value
of your ComboBox.

In a blank line below this and before another line that contains OpenForm
put the following in as a new line..

LinkCriteria = "[SalesPerson] = '" & Me!cboSalesPerson & "'"

You may want to copy and paste this as there is a mixture of single and
double quotes that are sometimes hard to decipher in an email.

Next, you will want to replace the 'SalesPerson' in brackets with the name
of your field that identifies the Sales Person in your invoice table. You
may have a glitch with this due to field names and data types, but if so,
come back with the details of your involved fields and we can easily get you
through it.

Good Luck!

Gary Miller
 
I currently have my startup form set up with command
boxes that say, "open new order" and "review existing
order". If the salesperson clicks "open new order", they
currently come to a new order form (record). If the
salesperson clicks "review existing order", the first
order form (record) within the table opens whether it is
that salesperson's customer or not.

Is it possible for me to set up the startup form in a
manner in which when a salesperson clicks on "review
existing order", a box comes up and either has him select
his name from a drop down/list/combo box or key in his
name and only his records show up?

What you could do is put a Combo Box, cboSalesman, on the startup form
itself. The user could select his or her own name, or if you want to
make it a bit easier, you could use a split database where each
salesperson has their own 'frontend', with the combo defaulting to
their own name.

The "Order" form could then be based on a Query referencing the
startup form combo box as a criterion: just put

=Forms!frmStartup!cboSalesperson

on the Criteria line (using your own form and combo box name).
If so, will it only
show the first record or will he be able to go to each
successive record simply by clicking "Enter"?

It'll show all that salesperson's records; they can use the navigation
buttons at the bottom of the screen to scroll through records. If
there isn't much data on each order, you could even make the Orders
form a Continuous form to show multiple scrollable records onscreen.
 
Hi Gary, thank you very much. I tried this but it
doesn't appear to work. Can I try to explain it one more
time?

In my database, I want the salesperson to be able to
locate his/her orders. Currently, I have created two
command buttons: one says: "Add New Order" & one that
says: "Review Existing Orders". The "Add New Order"
button causes a new record to open. The "Review Existing
Order" button opens with the first existing order.


What I would like for the database to do is either have a
button or drop down list on the Startup form which
says: "Salesperson" which the salesperson could type or
click their name from a drop down list and then
click "Review Existing Orders" and their orders come up
or they would click "Review Existing Orders" and another
form comes up with the salesperson's name in a dropdown
list and allows them to select their name and they are
able to review their orders. Is either of these possible?

Thanks again!
-----Original Message-----
There are a variety of methods to do this. I will use a fairly basic, easy
to setup one to help you.

As you are pleading "novice", can I assume that you used the wizard to
create your command buttons? If so, the following should work for you. If
not, you probably coded the button yourself and can use the gist of this to
modify your code.

Create a ComboBox on your form using the wizard and tell it that you want to
have it show the list of your SalesPeople from the SalesPeople table that I
hope you have made. If not, make one first. If you are storing the
SalesPerson in your invoice with an ID code instead of the name, good for
you, but as a novice, I will approach this assuming you aren't. Go to the
properties of this ComboBox and in the Other section change the control's
name to "cboSalesPerson".

In design view, double-click the ReviewExistingOrders button to bring up the
properties box. Go to the Events tab and you will see the OnClick line has
[Event Procedure] in it. If you click at the grey border at the very right
of this line you will get a little box with three dots ( an ellipse ) on it.
Click on this and it will take you into the world of VBA coding and you will
see the code that the wizard put in for you to open your form.

There is a line that says...

Dim LinkCriteria As String

This is reserving an opportunity for you to use it to specify criteria when
you open your form. We will do that by assigning this criteria to the value
of your ComboBox.

In a blank line below this and before another line that contains OpenForm
put the following in as a new line..

LinkCriteria = "[SalesPerson] = '" & Me!cboSalesPerson & "'"

You may want to copy and paste this as there is a mixture of single and
double quotes that are sometimes hard to decipher in an email.

Next, you will want to replace the 'SalesPerson' in brackets with the name
of your field that identifies the Sales Person in your invoice table. You
may have a glitch with this due to field names and data types, but if so,
come back with the details of your involved fields and we can easily get you
through it.

Good Luck!

Gary Miller

ND said:
I have created a startup form for a table that contains
50 customer records. Of course within each record, there
are several fields that only pertain to an individual
customer. There are six different salespeople for these
customers.

I currently have my startup form set up with command
boxes that say, "open new order" and "review existing
order". If the salesperson clicks "open new order", they
currently come to a new order form (record). If the
salesperson clicks "review existing order", the first
order form (record) within the table opens whether it is
that salesperson's customer or not.

Is it possible for me to set up the startup form in a
manner in which when a salesperson clicks on "review
existing order", a box comes up and either has him select
his name from a drop down/list/combo box or key in his
name and only his records show up? If so, will it only
show the first record or will he be able to go to each
successive record simply by clicking "Enter"?

HELP! I know this is alot but this is my first database
I have ever built and I need still a novice with this.
Help!


.
 
Read John Vinson's reply to you as this is really the
simplest to implement. You use the ComboBox wizard to help
you put one in and choose the 'Find a Record based on a
value selected' option and the wizard will do the code for
you. The only complication may be that if you were just on
Add New Order, you may have to change the mode of the form
out of DataEntry and remove any form filters.

Gary Miller


ND said:
Hi Gary, thank you very much. I tried this but it
doesn't appear to work. Can I try to explain it one more
time?

In my database, I want the salesperson to be able to
locate his/her orders. Currently, I have created two
command buttons: one says: "Add New Order" & one that
says: "Review Existing Orders". The "Add New Order"
button causes a new record to open. The "Review Existing
Order" button opens with the first existing order.


What I would like for the database to do is either have a
button or drop down list on the Startup form which
says: "Salesperson" which the salesperson could type or
click their name from a drop down list and then
click "Review Existing Orders" and their orders come up
or they would click "Review Existing Orders" and another
form comes up with the salesperson's name in a dropdown
list and allows them to select their name and they are
able to review their orders. Is either of these possible?

Thanks again!
-----Original Message-----
There are a variety of methods to do this. I will use a fairly basic, easy
to setup one to help you.

As you are pleading "novice", can I assume that you used the wizard to
create your command buttons? If so, the following should work for you. If
not, you probably coded the button yourself and can use the gist of this to
modify your code.

Create a ComboBox on your form using the wizard and tell it that you want to
have it show the list of your SalesPeople from the SalesPeople table that I
hope you have made. If not, make one first. If you are storing the
SalesPerson in your invoice with an ID code instead of the name, good for
you, but as a novice, I will approach this assuming you aren't. Go to the
properties of this ComboBox and in the Other section change the control's
name to "cboSalesPerson".

In design view, double-click the ReviewExistingOrders button to bring up the
properties box. Go to the Events tab and you will see the OnClick line has
[Event Procedure] in it. If you click at the grey border at the very right
of this line you will get a little box with three dots ( an ellipse ) on it.
Click on this and it will take you into the world of VBA coding and you will
see the code that the wizard put in for you to open your form.

There is a line that says...

Dim LinkCriteria As String

This is reserving an opportunity for you to use it to specify criteria when
you open your form. We will do that by assigning this criteria to the value
of your ComboBox.

In a blank line below this and before another line that contains OpenForm
put the following in as a new line..

LinkCriteria = "[SalesPerson] = '" & Me!cboSalesPerson & "'"

You may want to copy and paste this as there is a mixture of single and
double quotes that are sometimes hard to decipher in an email.

Next, you will want to replace the 'SalesPerson' in brackets with the name
of your field that identifies the Sales Person in your invoice table. You
may have a glitch with this due to field names and data types, but if so,
come back with the details of your involved fields and we can easily get you
through it.

Good Luck!

Gary Miller

ND said:
I have created a startup form for a table that contains
50 customer records. Of course within each record, there
are several fields that only pertain to an individual
customer. There are six different salespeople for these
customers.

I currently have my startup form set up with command
boxes that say, "open new order" and "review existing
order". If the salesperson clicks "open new order", they
currently come to a new order form (record). If the
salesperson clicks "review existing order", the first
order form (record) within the table opens whether it is
that salesperson's customer or not.

Is it possible for me to set up the startup form in a
manner in which when a salesperson clicks on "review
existing order", a box comes up and either has him select
his name from a drop down/list/combo box or key in his
name and only his records show up? If so, will it only
show the first record or will he be able to go to each
successive record simply by clicking "Enter"?

HELP! I know this is alot but this is my first database
I have ever built and I need still a novice with this.
Help!


.
 
Great. Thank you!
-----Original Message-----
Read John Vinson's reply to you as this is really the
simplest to implement. You use the ComboBox wizard to help
you put one in and choose the 'Find a Record based on a
value selected' option and the wizard will do the code for
you. The only complication may be that if you were just on
Add New Order, you may have to change the mode of the form
out of DataEntry and remove any form filters.

Gary Miller


ND said:
Hi Gary, thank you very much. I tried this but it
doesn't appear to work. Can I try to explain it one more
time?

In my database, I want the salesperson to be able to
locate his/her orders. Currently, I have created two
command buttons: one says: "Add New Order" & one that
says: "Review Existing Orders". The "Add New Order"
button causes a new record to open. The "Review Existing
Order" button opens with the first existing order.


What I would like for the database to do is either have a
button or drop down list on the Startup form which
says: "Salesperson" which the salesperson could type or
click their name from a drop down list and then
click "Review Existing Orders" and their orders come up
or they would click "Review Existing Orders" and another
form comes up with the salesperson's name in a dropdown
list and allows them to select their name and they are
able to review their orders. Is either of these possible?

Thanks again!
-----Original Message-----
There are a variety of methods to do this. I will use
a
fairly basic, easy
to setup one to help you.

As you are pleading "novice", can I assume that you
used
the wizard to
create your command buttons? If so, the following
should
work for you. If
not, you probably coded the button yourself and can
use
the gist of this to
modify your code.

Create a ComboBox on your form using the wizard and
tell
it that you want to
have it show the list of your SalesPeople from the SalesPeople table that I
hope you have made. If not, make one first. If you are storing the
SalesPerson in your invoice with an ID code instead of the name, good for
you, but as a novice, I will approach this assuming
you
aren't. Go to the
properties of this ComboBox and in the Other section change the control's
name to "cboSalesPerson".

In design view, double-click the ReviewExistingOrders button to bring up the
properties box. Go to the Events tab and you will see the OnClick line has
[Event Procedure] in it. If you click at the grey
border
at the very right
of this line you will get a little box with three
dots (
an ellipse ) on it.
Click on this and it will take you into the world of
VBA
coding and you will
see the code that the wizard put in for you to open
your
form.
There is a line that says...

Dim LinkCriteria As String

This is reserving an opportunity for you to use it to specify criteria when
you open your form. We will do that by assigning this criteria to the value
of your ComboBox.

In a blank line below this and before another line
that
contains OpenForm
put the following in as a new line..

LinkCriteria = "[SalesPerson] = '" & Me!cboSalesPerson & "'"

You may want to copy and paste this as there is a mixture of single and
double quotes that are sometimes hard to decipher in
an
email.
Next, you will want to replace the 'SalesPerson' in brackets with the name
of your field that identifies the Sales Person in your invoice table. You
may have a glitch with this due to field names and
data
types, but if so,
come back with the details of your involved fields and we can easily get you
through it.

Good Luck!

Gary Miller

I have created a startup form for a table that contains
50 customer records. Of course within each record, there
are several fields that only pertain to an individual
customer. There are six different salespeople for these
customers.

I currently have my startup form set up with command
boxes that say, "open new order" and "review existing
order". If the salesperson clicks "open new order", they
currently come to a new order form (record). If the
salesperson clicks "review existing order", the first
order form (record) within the table opens whether
it
is
that salesperson's customer or not.

Is it possible for me to set up the startup form in a
manner in which when a salesperson clicks on "review
existing order", a box comes up and either has him select
his name from a drop down/list/combo box or key in his
name and only his records show up? If so, will it only
show the first record or will he be able to go to each
successive record simply by clicking "Enter"?

HELP! I know this is alot but this is my first database
I have ever built and I need still a novice with this.
Help!


.


.
 
Back
Top