473,396 Members | 2,020 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,396 software developers and data experts.

Double Click event and loading a form

Hello, I wonder if anyone can help me. I am stuck on it for almost 3 weeks.

I have a table "JobDatabase" (which include all details of each job position), a dataentry form, a Search form. In my Search form, I had a list box and a combo box (include all departments), where staff can pull down the menu and choose the department to see the job positions within that department. Then, the result will show on the list box. Here is my VB for that step:
Expand|Select|Wrap|Line Numbers
  1. Private Sub combo0_Click()
  2. RefreshList
  3. End Sub
  4. Private sub RefreshList()
  5. Dim sql As String
  6. Dim selectedDeptID As Integer
  7. selectedDeptID = Me.Combo0.Value
  8. sql = "SELECt Jobdatabse.JobID, JobDatabase.JobPosition, JobDatabase.Dept FROM JobDatabase "_ & "WHERE JobDatabase.Dept = " & selectedDeptID _ & "ORDER BY JobDatabse.[JobPosition]"
  9. Me.List2.RowSource = sql
  10. End Sub
It worked good!

Now my next step is double click a selected item listed on the list box. If the staff double click one of the listed items, then a detail form (a form include all details of the selected jobposition) will pop out. I don't know what to do!!!!! Can anyone help me? Greatly appreciated.

Carol.
Oct 12 '11 #1
1 2696
Narender Sagar
189 100+
Hi Carol
One of the method is as follows:
1. you should have a 'Detail Form' in your database, having JobID as must field along with other fields.
2. Then you can create macro under Event On Double Click with field "JobID" in your mail form.
3. If Not IsNull([JobId]) Then
OpenForm
Form Name Your Detail Form name
View Form
Filter Name
Where Condition = ="[JobID]=" &[JobID]
Data Mode
Window Mode Dialog
EndIf
Oct 12 '11 #2

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

Similar topics

1
by: Dalan | last post by:
I probably just need a simple piece of code to do this as the couple tried so far have failed. I created a new Access 97 Form Filter (frmFilterForm) which displays most of the key data fields from...
2
by: Uninvisible | last post by:
I have put together a db for a law firm to keep track of counterfeit activities. There are four parent tables: tblContact tblTransaction tblAction tblFile I have created a form,...
1
by: active | last post by:
I've been working on a problem for a few days now. I do not get a Double-Click event fired for a ListView when I double click. I now find that if I double click with the right button it works OK....
2
by: techsatish | last post by:
Hi, I want the double click event to call(here not able to get the MouseEventArgs) and execute the mouseup event code or any one tell me how to make my treecontrol double click nodes to behave...
3
by: Techsatish | last post by:
how to make a mouseup event called only once during a double click event? here double click is made on a tree node in a tree control. I have the code inside mouseup event....in runtime the...
2
by: cumars | last post by:
Hello Friends, I want to trigger both the click event and double click event in a single button separately. (i.e.) the user can trigger both the single click and the double...
4
by: Jeff User | last post by:
Hi Using .NET 1.1, C#, web app I (actually our client) would like to be able to double click a selection in a listbox and have it postback to server . There I would want to access the item that...
4
by: Savita23 | last post by:
Hi, I have a subform in datasheet layout embedded in the main form.I want to invoke a procedure on the double click of each record in the subform.Is there a away by which I can fire the double...
6
by: Jim Devenish | last post by:
I have an unbound form that displays all the days of the year as a calendar. It has 12 rows of text boxes with either 29,30 or 31 in each row. Text box names are of the form: display_01_01,...
15
by: Martin Lang | last post by:
Hi All, Thanks for reading this :) I have a form A that consists of a main form A and a sub form A. In sub form A, I have a field which I can double click. Then, Main form B opens up with a...
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.