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.