473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Open a form to edit to a specific text box

I am using access 2003 with windows xp. I have created a data base for to keep track of my 180 employees. I have created a table with 21 records. Then I created a form to input employee data. I then created a switchboard to open a blank form. Now I want to use the swithchboard to open the form to a specific text box. ie, Edit Active Employees. I would like to do this by last name or SSN, two of the fields in the table. I can get it to open the table to the specific employee but not open the form to that employee. It always defaults to the first record. Thanks in advance for any and all help.

Don Croner
Dec 15 '06 #1
1 1853
MMcCarthy
14,534 Expert Mod 8TB
I am using access 2003 with windows xp. I have created a data base for to keep track of my 180 employees. I have created a table with 21 records. Then I created a form to input employee data. I then created a switchboard to open a blank form. Now I want to use the swithchboard to open the form to a specific text box. ie, Edit Active Employees. I would like to do this by last name or SSN, two of the fields in the table. I can get it to open the table to the specific employee but not open the form to that employee. It always defaults to the first record. Thanks in advance for any and all help.

Don Croner
You need a form with for instance a drop down list of employees and their SSN no. The row source for the combo box would be

Expand|Select|Wrap|Line Numbers
  1. SELECT SSN, EmpName FROM TableName ORDER BY EmpName;
or something like that the SSN No would be the bound column and could be set to invisible so it doesn't appear to the users.

Choose a user from the list and set a command button on the form e.g. cmdFindEmp and put the following code behind the button.

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdFindEmp_Click()
  2.  
  3.    DoCmd.OpenForm "FormName", , , "[SSN]=" & Me.ComboboxName
  4.  
  5. End Sub
  6.  
Mary
Dec 15 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
9
by: Good Man | last post by:
Hi This is sort of a weird question, perhaps a bit off-topic... I am on the 'edit' screen of a web form, and I have a bunch of variables coming from a database that need to be placed into the...
8
by: fonzie | last post by:
Is it possible to have a data entry form where the information is stored in several different tables (5 or 6)? I have an inventory database where Table1 stores all of the data common to all...
9
by: Don Croner | last post by:
Hi: The data base (access 2003) I am creating will have 150 employee files in it. I want to open a form to edit employee information. ie, if employee john smith gets a pay raise i want to edit his...
3
by: kev | last post by:
Hi folks, I have a form for registration (frmRegistration) whereby i have two buttons. One is Save which saves record using the OnClick property. I used wizard to create the save button. The...
1
by: Zvonko Bičkup | last post by:
This is in head section: function edit(textarea) { if (textarea == 0) { thedata = document.loginForm.usrname.value thenumber = 0 } else if (textarea == 1) { thedata =...
4
by: Martin Bentler | last post by:
I have a form that is locked for editing, adding or deleting. Through the use of a command button I open another form, that allows editing, plus allows the user to other areas of the database,...
2
by: eko99312 | last post by:
Let's say I have this form called Attendance List. The list was in datasheet form. In the list there were names and date checklist. The question is, I want to edit one of the names by double clicking...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.