Prompt for Criteria Field When Opening Form


K

Ken Hudson

I have a form that I use to populate a table. Some fields get data entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one criteria
when opening the form so the user only sees his records. For example the
criteria field is employee number and I want the user to enter their employee
number when they select the edit records option on the switchboard.
 
Ad

Advertisements

M

MikeJohnB

One way to do this is:

If your form is based on a query, enter the following into the criterian row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B
 
K

Ken Hudson

Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


MikeJohnB said:
One way to do this is:

If your form is based on a query, enter the following into the criterian row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
I have a form that I use to populate a table. Some fields get data entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one criteria
when opening the form so the user only sees his records. For example the
criteria field is employee number and I want the user to enter their employee
number when they select the edit records option on the switchboard.
 
D

Douglas J. Steele

There's no reason why you can't change the form to be based on a query
instead.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Ken Hudson said:
Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


MikeJohnB said:
One way to do this is:

If your form is based on a query, enter the following into the criterian
row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number
each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
I have a form that I use to populate a table. Some fields get data
entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one
criteria
when opening the form so the user only sees his records. For example
the
criteria field is employee number and I want the user to enter their
employee
number when they select the edit records option on the switchboard.
 
K

Ken Hudson

Thanks Doug.
You are correct. It has been so long since I have developed anything in
Access, I don't remember stuff I should. I guess I wasn't thinking that a
query would update the source table. My Bad.
I will create another form (an "edit" form) that uses a query as its source.

--
Ken Hudson


Douglas J. Steele said:
There's no reason why you can't change the form to be based on a query
instead.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Ken Hudson said:
Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


MikeJohnB said:
One way to do this is:

If your form is based on a query, enter the following into the criterian
row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number
each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


:

I have a form that I use to populate a table. Some fields get data
entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one
criteria
when opening the form so the user only sees his records. For example
the
criteria field is employee number and I want the user to enter their
employee
number when they select the edit records option on the switchboard.
 
M

MikeJohnB

I always base forms on queries because you can manipulate the data, sort,
restrict records to show only records after certain dates etc.

Before you try anything, make a copy of your database. (Right click the file
name of your database.mdb and select copy. Right click in the same folder and
select Paste. Rename the file with the name you want)

Its pretty easy to write a query based on your table. Highlight your table
sellect query from the insert menu. Select Simple Query. The query wizard
will start with your table selected as the source. If its not, select your
table from those listed, move alll the fields listed in the left hand list
into the right hand list by ressing the > button. Select Next, name the
query, I Normally name them QryTableName.

Press finish, you now have a query.

On your form, enter the Design Mode. Select the forms properties by right
clicking the little sqare box where the two rules join on the top left of the
form. Select Properties.

In the properties window, select the row marked Record Source (you will see
it has your table name there at the moment) and press the little button
marked with V arrow. Select your query. The form now has your query as its
control source. (Because you selected all the available fields when you made
the query, there will be no difference in the records presented to the form.)

You can modify the query by pressing the button with three dots ... the
underlying query for the form will now pop uo. In the crietria row of the
employee number is where you enter the code I suggested.

I hope this is not telling you how to suck eggs and hope you manage in your
quest. let me know how you get on should you choose this route????

Regards

Mike B
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


MikeJohnB said:
One way to do this is:

If your form is based on a query, enter the following into the criterian row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
I have a form that I use to populate a table. Some fields get data entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one criteria
when opening the form so the user only sees his records. For example the
criteria field is employee number and I want the user to enter their employee
number when they select the edit records option on the switchboard.
 
Ad

Advertisements

M

MikeJohnB

Wow, why did I bother typing all that out?
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


MikeJohnB said:
I always base forms on queries because you can manipulate the data, sort,
restrict records to show only records after certain dates etc.

Before you try anything, make a copy of your database. (Right click the file
name of your database.mdb and select copy. Right click in the same folder and
select Paste. Rename the file with the name you want)

Its pretty easy to write a query based on your table. Highlight your table
sellect query from the insert menu. Select Simple Query. The query wizard
will start with your table selected as the source. If its not, select your
table from those listed, move alll the fields listed in the left hand list
into the right hand list by ressing the > button. Select Next, name the
query, I Normally name them QryTableName.

Press finish, you now have a query.

On your form, enter the Design Mode. Select the forms properties by right
clicking the little sqare box where the two rules join on the top left of the
form. Select Properties.

In the properties window, select the row marked Record Source (you will see
it has your table name there at the moment) and press the little button
marked with V arrow. Select your query. The form now has your query as its
control source. (Because you selected all the available fields when you made
the query, there will be no difference in the records presented to the form.)

You can modify the query by pressing the button with three dots ... the
underlying query for the form will now pop uo. In the crietria row of the
employee number is where you enter the code I suggested.

I hope this is not telling you how to suck eggs and hope you manage in your
quest. let me know how you get on should you choose this route????

Regards

Mike B
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


MikeJohnB said:
One way to do this is:

If your form is based on a query, enter the following into the criterian row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


:

I have a form that I use to populate a table. Some fields get data entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one criteria
when opening the form so the user only sees his records. For example the
criteria field is employee number and I want the user to enter their employee
number when they select the edit records option on the switchboard.
 
Ad

Advertisements

K

Ken Hudson

Hi Mike,
Sorry that my very first question wasn't clear enough. I was thinking that I
needed to input and edit table data directly using a form. I haven't
developed db's very much lately, but I do know how to use queries with
prompts for criteria. I just needed your and Doug's "push" to jog my memory
to action.
The good news is that you have the query development answer ready to copy
and paste next time you need it.
Again, sorry for the extra work......
Best regards,

--
Ken Hudson


MikeJohnB said:
Wow, why did I bother typing all that out?
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


MikeJohnB said:
I always base forms on queries because you can manipulate the data, sort,
restrict records to show only records after certain dates etc.

Before you try anything, make a copy of your database. (Right click the file
name of your database.mdb and select copy. Right click in the same folder and
select Paste. Rename the file with the name you want)

Its pretty easy to write a query based on your table. Highlight your table
sellect query from the insert menu. Select Simple Query. The query wizard
will start with your table selected as the source. If its not, select your
table from those listed, move alll the fields listed in the left hand list
into the right hand list by ressing the > button. Select Next, name the
query, I Normally name them QryTableName.

Press finish, you now have a query.

On your form, enter the Design Mode. Select the forms properties by right
clicking the little sqare box where the two rules join on the top left of the
form. Select Properties.

In the properties window, select the row marked Record Source (you will see
it has your table name there at the moment) and press the little button
marked with V arrow. Select your query. The form now has your query as its
control source. (Because you selected all the available fields when you made
the query, there will be no difference in the records presented to the form.)

You can modify the query by pressing the button with three dots ... the
underlying query for the form will now pop uo. In the crietria row of the
employee number is where you enter the code I suggested.

I hope this is not telling you how to suck eggs and hope you manage in your
quest. let me know how you get on should you choose this route????

Regards

Mike B
--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


Ken Hudson said:
Hi Mike,
Thanks for the reply. The form is not based on a query so I can't use the
criteria prompt. The form puts data directly into the table.
--
Ken Hudson


:

One way to do this is:

If your form is based on a query, enter the following into the criterian row
of the query in the employee number column.

[Enter your Employee Number]

A popup input box will now prompt your user to enter his emplyee number each
time the form is opened. That is one way, not everyone likes that method.

Another way is to place a combo box on the form.

See Tom Wickerath's guide to Combo Boxes.

http://www.access.qbuilt.com/html/find_a_record.html

If you need help with setting that up, re post here

Hope this helps????

Kindest regards

Mike B


--
Advice to Posters.
Check your post for replies or request for more information.
Consider providing some feed back to the response you have recieved.
Kindest Regards Mike B


:

I have a form that I use to populate a table. Some fields get data entered
directly. Some are combo boxes, allowing selections from other tables.
After the table has been populated, I want to open the form from the
switchboard in edit mode. But I want the user to be prompted for one criteria
when opening the form so the user only sees his records. For example the
criteria field is employee number and I want the user to enter their employee
number when they select the edit records option on the switchboard.
 

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