Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please help RE: Tech Support Data base

Status
Not open for further replies.

nufather

Programmer
Mar 18, 1999
29
US
I am having a problem, This is what I want to do: I have 2 main tables 1. Employees(SSN,first,last...) and 2. CallsLog(all info from employees & type of trouble,date......) now what I want to do is on callslog form be able to enter in the SSN (which is the first field on the form) and after entering the ssn- populate the first,last..... on the callslog form. Currently the only way I have made this work is to make a query off of employees table and then run another append query to put it in the callslog table then open callslog form and go to last record. If anyone has any feedback please help me
 
Try putting some code behind one of the events for the SSN text box on the form that will look up the appropriate values and add them in. Code behind the Exit event for the text box would probably be a good bet.<br>
<br>
If you are using a form in datasheet view and the text boxes for first, last... are not bound to any fields in the CallsLog table (can't see why they would be) then this won't work. You could create a query which has two columns (SSN in one and all other info in the other, separated by commas or whatever) which you could then use as source for a combo box on the CallsLog form.<br>
<br>
Hope this helps
 
I'm not exactly sure what you're trying to do, but you shouldn't need to append the First, Last, etc. if that SSN is already available in Employees. Just pop up the name of the Employee on your form using a dlookup() command and show the system operator who is calling (you don't need to bind the CallsLog form to the CallsLog Table. In general I rarely do). You may want to just bind SSN and Comments to the form and let name be unbound. Then let the sysop type in any comments on the call. That should be all you should have to store. If you need to create a report of outstanding issues then you can do a join on SSN and pick up the name for the report. No reason to store in two places. Use the nz() (null to zero) function when calling dlookup() like this nz(dlookup("[fieldname]","[tablename]","[SSN] = 111223333")). This will only return one field, so alternatively you could create a recordset and get the entire name in the same piece of code rather than using dlookup.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top