Re: Customer List Selection
- From: dancole42@xxxxxxxxx
- Date: 21 Mar 2007 07:26:54 -0700
On Mar 21, 10:04 am, "storrboy" <storr...@xxxxxxxxxxxx> wrote:
On Mar 21, 8:47 am, dancol...@xxxxxxxxx wrote:
On Mar 21, 9:25 am, "storrboy" <storr...@xxxxxxxxxxxx> wrote:
On Mar 21, 8:05 am, dancol...@xxxxxxxxx wrote:
On Mar 20, 5:36 pm, "storrboy" <storr...@xxxxxxxxxxxx> wrote:
Have you considered making it a continuous form and adding a command
button on one end? It can still look and behave like a data***, but
you could add a button to the 'end of the row' that the user could
click on instead of the row fields.
Yes, but a data*** looks so much better.
Then I think you'll need to put whatever code it is you have into one
function that can be called in the double-click event of each field.
Right... that's what I'm asking. How do I do that? How do I create ONE
function that can be called from multiple events, rather than just
copy the same function over and over and over again?
Seeing as how you've given no indication what the code...
"..that runs some filters, checks against some queries, and
displays relevant message boxes that ultimately result in a form
coming up that lists all of the orders associates with this customer."
actually looks like or does I can only give you a skeleton example.
Make a function in the form code module
Function MyDoubleClickCode(Argument List) As WhateverItNeedsToReturn
On Error Goto Stoprun
<<insert what you have>>
Exit_Here:
Exit Function
Stoprun:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_Here
End Function
Call from doubleclick event of what ever controls apply.
Private Sub Controlname_DblClick(Cancel As Integer)
MyDoubleClickCode Argument List
End Sub
This is the code I want to run. How would I go about doing this?
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Requests"
stLinkCriteria = "[BillCustID]=" & "'" & Me![BillCustID] & "'" & "
and Cancelled = 0 and OrdType = 2 and OrdBatchID > -1"
DoCmd.Close
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!Requests.AllowAdditions = True
If Forms![Requests]![OrdType] <> "2" Then
Forms!Requests.AllowAdditions = False
DoCmd.Close
Msg2 = "There are no requests on file for this customer. Better
luck next time, chump. HA HA HA HA!"
Title2 = "No Requests Found"
Style2 = vbMsgBoxSetForeground + vbApplicationModal
Response = MsgBox(Msg2, Style2, Title2)
Else
Forms!Requests.AllowAdditions = False
End If
.
- Follow-Ups:
- Re: Customer List Selection
- From: storrboy
- Re: Customer List Selection
- References:
- Customer List Selection
- From: dancole42
- Re: Customer List Selection
- From: storrboy
- Re: Customer List Selection
- From: dancole42
- Re: Customer List Selection
- From: storrboy
- Re: Customer List Selection
- From: dancole42
- Re: Customer List Selection
- From: storrboy
- Customer List Selection
- Prev by Date: Re: Converting Access 2000 to 2003
- Next by Date: Re: Oracle 10g RC2 ODBC Access - odbc failed - where xyz <> "S"
- Previous by thread: Re: Customer List Selection
- Next by thread: Re: Customer List Selection
- Index(es):