Trapping a value to use in my form

K

Keith

I am quite new to this and need some help.

I have a form with a record source of a query. In the query I have the
criteria set to ask the user a question in a popup box which searches a
table for that input which is then reported back to the form to view

EmployeeNumberQuery is as follows:

Field: Employee
Table: Employee_Number
Criteria: [Enter the Employee Number] <-this is the value I want
to capture and display in the form

This query also has other fields that are reported back to the form that
match the entered value

The Employee_Listing_Table is as follows:

Form Header has one unbound text box - Text0 to display the value [Enter the
Employee Number] entered from the query
Detail has one unbound text box - Text1 to display all other values that
correspond to [Enter the Employee Number] in a continious listing form

The form looks like this:

Training for Employee 12345 <- Value entered for [Enter the Employee
Number] and is in the Header

XXXX Welder
XXXX Torch
XXXX SCBA <- These items shown in the Detail section
XXXX Micrometer
XXXX Cl2 Procedures

My problem is if a value is entered in the [Enter the Employee Number] is
not found in the table, it is not displayed in the form. I comes back blank
although I would like for it to appear showing that is what the search was
for. This is what the it looks like if 12345 is not found in the table:

Training for Employee <-Searched number not shown.

Please help...is there any way to trap that entered value so it can always
be displayed

Thanks in advance
 
U

UpRider

Keith, the short answer is NO.
However, you can take a new approach. Instead of inputting the employee
number in a popup, you could type it directly into the form that you are
using.
1. Remove the '[Enter Employee Number]' criteria from the query.
2. Add a combo box to your form and use the wizard to 'lookup value in a
table or query'. The wizard will ask if you want to store the value in a
table; you do not.

I think this will do exactly what you want in a cleaner fashion than using
your current parameter query.

UpRider
 
F

flyinghi5

UpRider....thanks for your input. You have me so close to what I'm trying
to do. With this change that you suggest, but I still can't get the results
of the query to show up in my form. I have it set up to run the query and
the query shows the data in its own format but does not send it to the form.

If you could tell me how to do this, I'd be very grateful

thanks


UpRider said:
Keith, the short answer is NO.
However, you can take a new approach. Instead of inputting the employee
number in a popup, you could type it directly into the form that you are
using.
1. Remove the '[Enter Employee Number]' criteria from the query.
2. Add a combo box to your form and use the wizard to 'lookup value in a
table or query'. The wizard will ask if you want to store the value in a
table; you do not.

I think this will do exactly what you want in a cleaner fashion than using
your current parameter query.

UpRider

Keith said:
I am quite new to this and need some help.

I have a form with a record source of a query. In the query I have the
criteria set to ask the user a question in a popup box which searches a
table for that input which is then reported back to the form to view

EmployeeNumberQuery is as follows:

Field: Employee
Table: Employee_Number
Criteria: [Enter the Employee Number] <-this is the value I
want to capture and display in the form

This query also has other fields that are reported back to the form that
match the entered value

The Employee_Listing_Table is as follows:

Form Header has one unbound text box - Text0 to display the value [Enter
the Employee Number] entered from the query
Detail has one unbound text box - Text1 to display all other values that
correspond to [Enter the Employee Number] in a continious listing form

The form looks like this:

Training for Employee 12345 <- Value entered for [Enter the Employee
Number] and is in the Header

XXXX Welder
XXXX Torch
XXXX SCBA <- These items shown in the Detail
section
XXXX Micrometer
XXXX Cl2 Procedures

My problem is if a value is entered in the [Enter the Employee Number] is
not found in the table, it is not displayed in the form. I comes back
blank although I would like for it to appear showing that is what the
search was for. This is what the it looks like if 12345 is not found in
the table:

Training for Employee <-Searched number not shown.

Please help...is there any way to trap that entered value so it can
always be displayed

Thanks in advance
 
U

UpRider

Did the form show any data from your query before the combobox addition?
Is the recordsource for your form the query?
Have you bound the controls in your form to the query columns?
Are you getting any error messages?
What version of Access?

UpRider

flyinghi5 said:
UpRider....thanks for your input. You have me so close to what I'm trying
to do. With this change that you suggest, but I still can't get the
results of the query to show up in my form. I have it set up to run the
query and the query shows the data in its own format but does not send it
to the form.

If you could tell me how to do this, I'd be very grateful

thanks


UpRider said:
Keith, the short answer is NO.
However, you can take a new approach. Instead of inputting the employee
number in a popup, you could type it directly into the form that you are
using.
1. Remove the '[Enter Employee Number]' criteria from the query.
2. Add a combo box to your form and use the wizard to 'lookup value in a
table or query'. The wizard will ask if you want to store the value in a
table; you do not.

I think this will do exactly what you want in a cleaner fashion than
using your current parameter query.

UpRider

Keith said:
I am quite new to this and need some help.

I have a form with a record source of a query. In the query I have the
criteria set to ask the user a question in a popup box which searches a
table for that input which is then reported back to the form to view

EmployeeNumberQuery is as follows:

Field: Employee
Table: Employee_Number
Criteria: [Enter the Employee Number] <-this is the value I
want to capture and display in the form

This query also has other fields that are reported back to the form that
match the entered value

The Employee_Listing_Table is as follows:

Form Header has one unbound text box - Text0 to display the value [Enter
the Employee Number] entered from the query
Detail has one unbound text box - Text1 to display all other values
that correspond to [Enter the Employee Number] in a continious listing
form

The form looks like this:

Training for Employee 12345 <- Value entered for [Enter the Employee
Number] and is in the Header

XXXX Welder
XXXX Torch
XXXX SCBA <- These items shown in the Detail
section
XXXX Micrometer
XXXX Cl2 Procedures

My problem is if a value is entered in the [Enter the Employee Number]
is not found in the table, it is not displayed in the form. I comes
back blank although I would like for it to appear showing that is what
the search was for. This is what the it looks like if 12345 is not
found in the table:

Training for Employee <-Searched number not shown.

Please help...is there any way to trap that entered value so it can
always be displayed

Thanks in advance
 
F

flyinghi5

Uprider

the answers to your questions are as follows

- Yes, it always returned all the info I needed in a pretty format unless
there was nothing to report
- Yes, form recordsource is the query
- Yes & No, the combobox is not bound becuase I do not want to change data
but the returned data text box is indeed bound to the query columns
- Access 2007

Again, thank you so much for your time


UpRider said:
Did the form show any data from your query before the combobox addition?
Is the recordsource for your form the query?
Have you bound the controls in your form to the query columns?
Are you getting any error messages?
What version of Access?

UpRider

flyinghi5 said:
UpRider....thanks for your input. You have me so close to what I'm
trying to do. With this change that you suggest, but I still can't get
the results of the query to show up in my form. I have it set up to run
the query and the query shows the data in its own format but does not
send it to the form.

If you could tell me how to do this, I'd be very grateful

thanks


UpRider said:
Keith, the short answer is NO.
However, you can take a new approach. Instead of inputting the employee
number in a popup, you could type it directly into the form that you are
using.
1. Remove the '[Enter Employee Number]' criteria from the query.
2. Add a combo box to your form and use the wizard to 'lookup value in a
table or query'. The wizard will ask if you want to store the value in
a table; you do not.

I think this will do exactly what you want in a cleaner fashion than
using your current parameter query.

UpRider

I am quite new to this and need some help.

I have a form with a record source of a query. In the query I have the
criteria set to ask the user a question in a popup box which searches a
table for that input which is then reported back to the form to view

EmployeeNumberQuery is as follows:

Field: Employee
Table: Employee_Number
Criteria: [Enter the Employee Number] <-this is the value I
want to capture and display in the form

This query also has other fields that are reported back to the form
that match the entered value

The Employee_Listing_Table is as follows:

Form Header has one unbound text box - Text0 to display the value
[Enter the Employee Number] entered from the query
Detail has one unbound text box - Text1 to display all other values
that correspond to [Enter the Employee Number] in a continious listing
form

The form looks like this:

Training for Employee 12345 <- Value entered for [Enter the Employee
Number] and is in the Header

XXXX Welder
XXXX Torch
XXXX SCBA <- These items shown in the Detail
section
XXXX Micrometer
XXXX Cl2 Procedures

My problem is if a value is entered in the [Enter the Employee Number]
is not found in the table, it is not displayed in the form. I comes
back blank although I would like for it to appear showing that is what
the search was for. This is what the it looks like if 12345 is not
found in the table:

Training for Employee <-Searched number not shown.

Please help...is there any way to trap that entered value so it can
always be displayed

Thanks in advance
 
U

UpRider

OK. Please paste the combobox row source and the form recordsource
properties.
Is there anything in the combobox dropdown?


flyinghi5 said:
Uprider

the answers to your questions are as follows

- Yes, it always returned all the info I needed in a pretty format unless
there was nothing to report
- Yes, form recordsource is the query
- Yes & No, the combobox is not bound becuase I do not want to change data
but the returned data text box is indeed bound to the query columns
- Access 2007

Again, thank you so much for your time


UpRider said:
Did the form show any data from your query before the combobox addition?
Is the recordsource for your form the query?
Have you bound the controls in your form to the query columns?
Are you getting any error messages?
What version of Access?

UpRider

flyinghi5 said:
UpRider....thanks for your input. You have me so close to what I'm
trying to do. With this change that you suggest, but I still can't get
the results of the query to show up in my form. I have it set up to run
the query and the query shows the data in its own format but does not
send it to the form.

If you could tell me how to do this, I'd be very grateful

thanks


Keith, the short answer is NO.
However, you can take a new approach. Instead of inputting the employee
number in a popup, you could type it directly into the form that you
are using.
1. Remove the '[Enter Employee Number]' criteria from the query.
2. Add a combo box to your form and use the wizard to 'lookup value in
a table or query'. The wizard will ask if you want to store the value
in a table; you do not.

I think this will do exactly what you want in a cleaner fashion than
using your current parameter query.

UpRider

I am quite new to this and need some help.

I have a form with a record source of a query. In the query I have
the criteria set to ask the user a question in a popup box which
searches a table for that input which is then reported back to the
form to view

EmployeeNumberQuery is as follows:

Field: Employee
Table: Employee_Number
Criteria: [Enter the Employee Number] <-this is the value I
want to capture and display in the form

This query also has other fields that are reported back to the form
that match the entered value

The Employee_Listing_Table is as follows:

Form Header has one unbound text box - Text0 to display the value
[Enter the Employee Number] entered from the query
Detail has one unbound text box - Text1 to display all other values
that correspond to [Enter the Employee Number] in a continious listing
form

The form looks like this:

Training for Employee 12345 <- Value entered for [Enter the Employee
Number] and is in the Header

XXXX Welder
XXXX Torch
XXXX SCBA <- These items shown in the Detail
section
XXXX Micrometer
XXXX Cl2 Procedures

My problem is if a value is entered in the [Enter the Employee Number]
is not found in the table, it is not displayed in the form. I comes
back blank although I would like for it to appear showing that is what
the search was for. This is what the it looks like if 12345 is not
found in the table:

Training for Employee <-Searched number not shown.

Please help...is there any way to trap that entered value so it can
always be displayed

Thanks in advance
 

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