Search form to add new record

ukaduka

New member
Local time
Today, 15:55
Joined
Oct 26, 2014
Messages
4
Hey guys!

I'm creating a database for work to do with health and safety. What I'm trying to do it create a form, where I search for a certain employee (by surname or id) to add a new record against that name.

I've got an employees table and a tool box talk table, they are linked by NI Number.

This is what it looks so far (although the records are showing in the form)

Untitled.png

Hope someone can help me out? :banghead:
 
Why do you need a search? Just use a TextBox or a ComboBox and set it's RecordSource to your Employees table.
 
Because we've got a lot of employees, we'd spent too long looking through the names
 
Sorry, but that makes no sense to me, a Lookup is a Lookup! The field should find as you type so to make it easier. Plus, you are using a Textbox to search from, is this not correct? Why not use a ComboBox instead?

Plus, you have not provided any code for your search button, do you have any or is it not working? Is the TextBox bound? Is the form/fields bound?
 
Yes my search button works. I used an unbound textbox and built a macro here's the code:

[Surname] Like "*" & [Forms]![NewTBT]![Text2] Or [First Name] Like "*" & [Forms]![NewTBT]![Text2] Or [CSCS Card] Like "*" & [Forms]![NewTBT]![Text2]

I need it to find the person so I can add a new record against that person's "profile". I hope that makes sense
 

Users who are viewing this thread

Back
Top Bottom