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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form help 1

Status
Not open for further replies.

BabyPowder2u

Programmer
May 4, 2005
87
0
0
US
I have a cbo subPOC if you DblClick it pulls up an add screen to allow you to enter a new POC in the POC table. The code is:

Private Sub SubPOC_DblClick(Cancel As Integer)

On Error GoTo Err_SubPOC_DblClick
Dim lngSubPOCID As Long
If IsNull(Me![SubPOC]) Then
Me![SubPOC].Text = ""
Else
lngSubPOCID = Me![SubPOC]
Me![SubPOC] = Null
End If
DoCmd.OpenForm "frmPOC_dblClk", , , , , acDialog, "GotoNew"
Me![SubPOC].Requery
If lngSubPOCID <> 0 Then Me![SubPOC] = lngSubPOCID
Forms!frmRequest_Add.SubPOC = Me![SubPOC]

Exit_SubPOC_DblClick:
Exit Sub

Err_SubPOC_DblClick:
MsgBox Err.Description
Resume Exit_SubPOC_DblClick
End Sub

What I want to do, is if a name is selected in the cbo field, to have a "rightclick" (or even dblClick that checks the value of the cbo) that pulls up a POC_Modify form with that POC selected.

Any help would be appreciated.

T
 
You could use the click event of the combobox. It is fired after a value is selected.

Hope this helps

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
I can't really see using the click event, as I would think, that would be used for any selection of the POC name. I need a distinct event (or check, other than original selection) to indicate they want to make a change to the base POC table. The cbo is used to select a POC name from the POC table. The POC-dblclick event allows the user to enter a POC that isn't currently in the table. I want an event that will pull up the modify POC form with that record selected.

T
 
How about....

Use the AfterUpdate or Click event to bring up the modify form.
Use the NotInList event to bring up the add new form.


Randy
 
Could you try using the MouseUp event of the Combo and checking for the condition of Button = 2 to signify the right mouse button?

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
HarleyQuin,

Do you have a sample of how I might do that? I am unfamialar with the "MouseUp" and button values.

T
 
A very simple example would be:
Code:
Private Sub Combo0_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MsgBox Button
End Sub
That will tell you the integer value of the mouse button you clicked in the combobox.

HarleyQuinn
---------------------------------
Help us to help you,
read FAQ222-2244 before posting.
 
Great, I can get the mouseup event to give me the button pressed.
Now, what I want to do is open form POC_ModDel, which gets it's data from tblPOC, and open to the record in subPOC

Do you know how I can do this? (I don't know how to use the filter events on a form)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top