|
-
Feb 19th, 2005, 09:47 PM
#1
Thread Starter
Addicted Member
New to VBA Please help
Hello,
I'm new to VBA so want some help in MS Access. I've made three tables
Company
Order
Transaction
Company contains all details of company. Order contains bill no, bill date and total bill amount and Transaction contains Sno,Particulars, rate, qty and amount. I've set the respective relationships i.e. one-to-many between Company and Order and one-to-many between Order and Transaction. I've made a order form with transcation sub form so that I can enter whole bill details and save it to the tables. Now I want a print preview of this using report so I made a report and kept a Preview Report button on the Order Form. But, it shows all records from the table the thing I need is that it should show the records from the current bill.
Last edited by pbuddy_8; Feb 20th, 2005 at 06:35 AM.
-
Feb 19th, 2005, 10:30 PM
#2
Re: New to VBA Please help
When you open your report from the preview button on your form, you need
to specify any filter conditions or parameters.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 19th, 2005, 11:11 PM
#3
Thread Starter
Addicted Member
Re: New to VBA Please help
Please give me an example of that
-
Feb 20th, 2005, 12:49 AM
#4
Re: New to VBA Please help
VB Code:
Private Sub cmdOpenReport_Click()
On Error GoTo Err_Command6_Click
'Run a menu command to filter the form
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 0, , acMenuVer70
'Or Open a report with a where condition to limit the records.
DoCmd.OpenReport "MyReport", acViewPreview, , "ReportID = 888"
Exit_Command6_Click:
Exit Sub
Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 20th, 2005, 06:33 AM
#5
Thread Starter
Addicted Member
Re: New to VBA Please help
-
Feb 20th, 2005, 12:32 PM
#6
Re: New to VBA Please help
No prob.
The where condition in the OpenReport method is like a SQL where clause
without the word "Where".
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|