Access VBADiscuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access VBA 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
I need to export the result of q query to a text file. but the trick is that i need to limit each line by 150 character max. i think that i need to keep a counter of what i'm adding to the file. but any idea how???
thank you very much
I am not sure why you need to limit this, but you can do this by putting all the fields in your query into a variable for the line, and then passing the variable like this:
thank you for responding. yes i do have all of these.
i'm using DAO.
I apreciate your help. buti don't need to only chop off the end fothe line. what i need is to make sure that the line is only 150 characters long and that the fields within the line match up with their predefined lengths. so that if they're less than a certain length we need to add nulls and if they are more then we need to chop off the extras.