 |

04-20-2002, 07:41 AM
|
|
|
anybody want to fix my code
|
anybody want to fix my code, thanks alot!!!
Private Sub CMDPRINT_Click()
Dim Formula_Date As String
Dim Response_branch As String
rpt2.Formulas(0) = Empty
Response_branch = Empty
Formula_Date = Empty
Response_branch = InputBox("Input the Branch Type", "Metrobank")
If Response_branch <> Empty Then
Response_date = InputBox("Input the Date of Tracer" & vbCrLf _
& "(yyyy, mm, dd)", "Metrobank")
If Response_date <> Empty Then
rpt2.ReportFileName = App.Path & "\tracer.rpt"
refreshed ang data
rpt2.DataFiles(0) = App.Path & "\master.mdb"
Formula_Date = Format(Response_date, "yyyy, mm, dd")
rpt2.ReplaceSelectionFormula ("{tracer.DATE} = date(" & Response_date & ") and {tracer.branch} ='" & Response_branch & "'")
rpt2.Destination = crptToWindow
rpt2.Formulas(0) = "Username='" & username & "'"
rpt2.PrintReport
End If
End If
End Sub
|
|

04-20-2002, 07:50 AM
|
 |
ISearchGoogle
Retired Moderator * Expert *
|
|
Join Date: May 2001
Location: england
Posts: 6,321
|
|
No thanks, I don't.
Is there a problem with it?
|
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
|

04-22-2002, 07:00 AM
|
|
Banned
|
|
Join Date: Jan 2002
Location: Australia, Sydney
Posts: 356
|
|
|
Hmm.
I like this thread. I dont know why but I do.
|
|

04-22-2002, 07:04 AM
|
 |
| Coder XXX |
Retired Leader
|
|
Join Date: Jun 2001
Location: Kuala Lumpur, Malaysia.
Posts: 3,018
|
|
|
can u please tell, what is the problem?.. You are asking to fix it, but not specifying what problem you are encountering? have u tried yourself?..
|
|

04-22-2002, 07:08 AM
|
 |
MetaCenturion
Retired Moderator * Guru *
|
|
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
|
|
Not my area of expertise, but I found it strange that Formula_Date is just storing a value.
Code:
Formula_Date = Format(Response_date, "yyyy, mm, dd")
rpt2.ReplaceSelectionFormula ("{tracer.DATE} = date(" & Response_date & ") and _
{tracer.branch} ='" & Response_branch & "'")
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|