Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > anybody want to fix my code


Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2002, 07:41 AM
rhizt
Guest
 
Posts: n/a
Cool 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
Reply With Quote
  #2  
Old 04-20-2002, 07:50 AM
ChiefRedBull's Avatar
ChiefRedBull ChiefRedBull is offline
ISearchGoogle

Retired Moderator
* Expert *
 
Join Date: May 2001
Location: england
Posts: 6,321
Default

No thanks, I don't.

Is there a problem with it?
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
Reply With Quote
  #3  
Old 04-22-2002, 07:00 AM
Kitaiko Kitaiko is offline
Banned
 
Join Date: Jan 2002
Location: Australia, Sydney
Posts: 356
Default

Hmm.
I like this thread. I dont know why but I do.
Reply With Quote
  #4  
Old 04-22-2002, 07:04 AM
Anis's Avatar
Anis Anis is offline
| Coder XXX |

Retired Leader
 
Join Date: Jun 2001
Location: Kuala Lumpur, Malaysia.
Posts: 3,018
Default

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?..
__________________
Regards,
Muhammad Anis Ur Rehman

Miles to go Before I Sleep.

http://www.projekcarpet.com/anis.html
Reply With Quote
  #5  
Old 04-22-2002, 07:08 AM
Iceplug's Avatar
Iceplug Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: California, USA
Posts: 16,583
Default

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 & "'")
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->