Wrox Programmer Forums
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2005, 06:38 AM
Authorized User
 
Join Date: Apr 2005
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default two questions..urget

i have to guestions:
i'm totally new to this access and vba stuff so i would really aprecialte a detailed answer.
1.my first question is: i have a report that inludes a feild that starts with numbers and ends with characters (say "1111test") and i need to get only the numbers how do i do this? i know this is done using vba and some function called "val" but i wasn't able to make the thing work.
2.my second question is: after i'm done with this report i want to export it to a flat file. and no i can't got to file>export. i want it to have no format just raw data. i also know that this is done thru vba and functions like open(), write() but can you add more intfo

thank you very much
and i would apreciate a quick response
 
Old April 7th, 2005, 12:09 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

If you can count on the field always having the same number of digits, you can set the textbox’s contents to =Left$(FieldNameHere, 4)

It is probably best to use a query to send the data to a file. You can use Access’ Export routines to export queries just like tables.
Alternately, you can add a printer driver for Generic Text, then print using that driver, and check the box for Print to File. (Access will add line-feeds and such to line up what the print would have been to accomodate page boundaries, and so on, but this method can be useful...)





Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Interview Questions, C# Interview Questions, dotnetuncle .NET Framework 2.0 4 June 22nd, 2019 07:03 AM
C++ questions jam93 C++ Programming 1 August 19th, 2007 10:39 PM
INPUT type=file (Urget Help) surendran PHP How-To 1 April 9th, 2006 12:42 PM
two questions reverand Excel VBA 2 December 5th, 2005 06:33 AM
E-mail error plz help its urget Samikaraeen Pro VB.NET 2002/2003 0 March 3rd, 2005 07:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.