473,385 Members | 1,813 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,385 software developers and data experts.

How do I open "Employee Detail" from "Project List"

Hi, I've been very frustrated for 2 days trying to make this work. I started with a built-in template "Projects" that came with Access 2007. On the "Employee List" I can click on any cell and bring up the Employee Detail" corresponding to that particular cell. That works fine. I want to be able to open "Employee Detail" when I click on a cell in "Project Detail". I got to the point that "Employee Detail" opens but only to the frst record. PLEASE help!

Here’s the code for double clicking on any cell in “employee list”. This works!
Function macro5()

DoCmd.OpenForm "Employee Details", acNormal, "", "[ID]=" & .ID, , acDialog
TempVars.Add "CurrentID", "[ID]"
DoCmd.Requery ""
DoCmd.SearchForRecord , "", acFirst, "[ID]=" & TempVars!CurrentID
TempVars.Remove "CurrentID"

Exit Function

Here is the VBA Code for double clicking on the “Principal in Charge”. I added the message box to see which record is shown.
Dim curr_rec As String

Private Sub Principal_in_Charge_DblClick(Cancel As Integer)
curr_rec = [Principal in charge]
DoCmd.OpenForm FormName:="employee details"
Forms![employee details].SetFocus
DoCmd.GoToRecord , , acGoTo, curr_rec
MsgBox (curr_rec)
End Sub
Mar 20 '08 #1
0 1653

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

Similar topics

6
by: PaulR | last post by:
We have seen this a lot, but have just experienced the opposite to what we have always seen previously, so this has prompted me to ask a high level - why do we get this behaviour? If we re-write...
9
by: Mike Labosh | last post by:
Code is easy. These are two OOP design issues that I am chewing on. Coming from classic VB, I'm not great at OO design. I prefer to write mile long spaghetti methods in a Temp module, and then...
9
by: Marco Castro | last post by:
I tried to google for information of what the output of the "LIST" command means but couldn't find any articles that tell me exactly what every character means. I can figure out most of it, its...
1
by: tinman | last post by:
Hi.... Would appreciate some advice on how to achieve the following in an OOP manner: Supposed, I have the following object model: Employee | | - - Projects
5
by: mabond | last post by:
Hi all This question is one of "theory" rather than a search for the specifics of a solution. I need some pointers as to how to proceed with my project. Here goes. My application allows the...
2
by: Rico | last post by:
Hello, Is there any way to get rid of or replacing the error message that pops up when you enter a combo box item that isn't in the list? I've tried using the Not In List event, but there is...
4
by: Bob | last post by:
I have an Access application where I need to automatically forward emails to a group of 12 salespeople as soon as they arrive. The first email needs to go to the first salesperson on the list, the...
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
5
by: Stefano Tonello | last post by:
Hi all, I need to call windows' "open with" dialog from my C# windows form application. After the user selects application, control must return to me (I have to launch directly the process). I...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.