I'm positive the syntax is
While True
'Your Code here
If (strCurrentRecord = strLastRecord) Then
Goto ExitLoop
End if
Wend
ExitLoop:
'The code will jump to here when If condition met
or
While strCurrentRecord <> strLastRecord
'Your Code here
Wend
Try putting up more of your code if...
I'm writing a method that takes info from a Table and exports it to a Excel spreadsheet.
Is it possible to capture the names of each field individually so I can setup the column names of the spreadsheet?
Ta.
I was thinking a proper chat room not so much a forum... It would be a great to learn about the people behind the Avatars...
Then again like I said I'd get nothing done and I if any valid topics were raised they wouldn't be stored in the forums.
Well as you guys say...
Cheers Guv, you ain't arf bad for a northern monkey. If I catch you in me local boozer I'll shout you a pint of..... Fosters ;)
Pete
That actually was it! Thanks! I hadn't even begun to think about how I'd deal with all the extra pages in the workbook now...
Thanks for that, much appriciated. I dont suppose you know how to rename the Sheets do you?
.................my stupidity amazes me sometimes......
Do you see those Sub calls to AddODPHeaders etc... Well their purpose is to add the header names of the Recordsets FieldNames... Now I thought I was being being good and at the end of these Methods I did this....
Set objSht = Nothing
I...
Sorry I should have mentioned all the different combinations I've tried... The original code I posted contained an "=" for some reason...
lets see I've tried
objXl.Application.SaveAs "G:\S.O.S\" & ReportType & ".xls"
objSht.Application.SaveAs "G:\S.O.S\" & ReportType & ".xls"
objXl.SaveAs...
ARGH!!! HELP HELP HELP!!!!!!!!!!!!!!
By changing:
objSht.SAVEAS = "G:\S.O.S\" & ReportType & ".xls"
To
objSht.Application.Save
I can get a Save dialog box to appear in Excel. Now you'd think that using objSht.Application.SaveAs would work as well but noooooooo. It doesn't.
What the $%@* is...
Hi Folks,
My first foray into Excel Spreadsheet creation has hit a snag.
I can create the spreadsheets and populate them with data as required however for some reason VBA does not recognise
.SaveAs as a valid action. Funnily enough even when I try to get a list of available actions from any...
I'm not sure (I use Access 97) but I thought RecordCount property only applied to RecordSet objects. If you put this small bit of code before I think it should work.
Dim Rst as Recordset
Dim Db as Database
Dim SQLString as String
SQLString = "SELECT * FROM [Jobs Table]"
Set Db = CurrentDB...
Is it possible to just print the contents of a subform ignoring everthing on the main form?
I haven't got the foggiest on this one... I dont think it is...
Any help appriciated.
Cheers
Any idea when Jon's going to choose one? I'm hoping to get my done over the weekend... If I don't kill myself - I'm learning how to in-line skate...
Speaking of which anyone got any tips for newbie skaters?
Goto a new thread I've got going if you want to stop me from eating gravel... or just go...
I'll give it a shot... but I can't do it during work hours...
I dont have the apps here... There's not much call for Photoshop in a bank...
It makes doctoring all the digital photos of my workmates really hard when all you've got is "Paint"...
:cool: