I've come across this too, the concatenated text disappears, leaving a blank field when a pop-up opens over it. I found that removing the Trim solved the issue. I just have to put up with an untidy looking field.
AceMan1 hope you feeling better.
Regards
Encapsulate the whole sql in quotes, get rid of the semi-colon at the end (VBA doesn’t seem to like it) and remove all line breaks (return) so the statement reads as one single line (you can break the line for easy reading with an underscore)
DoCmd.Runsql “UPDATE MasterData SET...
One further question.
I’m trying to incorporate the same method into another table which unfortunately as a field with a space eg ‘Organisation name’ how would I handle this?
Regards
Very nice indeed.
got it to do just what I wanted with minor trickery on the form.
Absolutely beautiful.
Having done all that, I then played around with 'OutputTo'
What would the drawback be with using something like this
DoCmd.OutputTo acQuery, "QryTest", "MicrosoftExcel(*.xls)", "", True,
Thanks guys,
I did look high and low before asking the question, but as always, I was probably looking in all the wrong places. I'll continue the hunt this evening, starting with your suggestions.
Thanks
Hi all,
Could some give me some guidance on how to get a dialog box to ask for a location when exporting to excel. Here’s an example of what I’m doing at the moment;
eg DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, “QryTest”, "C:\test.xls", True
I’ve had a look at ‘How to use...
Knew I'd seen this somewhere. Nice call. However, I didn't use the code in this app, but did in another.
I'm gonna give you star just for having such a fantastic recall.
Thanks Golom,
Just seemed so odd since I'm still developing the app. and haven't yet split the tables form the FE.
Still scratching my head as to how this got there. Anyhow seems harmless enough.
Take care.
Me.DBPathTXT = DLookUp("Database", MSysobjects", "[Flags] = 2097152")
This mysteriously appeared on my main menu’s OnOpen event! Can anyone work out what it’s doing? Or event better still any ideas how it might have got there?
Bizzar no!
Hi all,
Thank you so much, both suggestions work perfectly
Aceman,
Sorry, neglected to mention I have column headings, but minor tinkering did the trick.
Me! LstNames.Column(4, (Me! LstNames.ListIndex) + 1)
PHV,
Beautiful. As always you have a way for simplifying things that I spend hours...
Hi Romeou,
You quite right, the list box isn't multi select.
I tried your suggestion but got a run-time error
"Runtime error 2480
You referred to a property by a numeric argument that isn’t one of the property numbers in the collection."
(Just for info, the count starts from 0)
Thanks for...
Hi,
I have a list box (LstNames) with 6 columns and variable number of rows. I’d want to target the 5th column of the current (selected) row.
I’ve read the help file and have spent the best part of the whole day trying various things without much luck.
Me.LstNames.column(4,?)
Any help or...
I’ve found the offending script.
I have a couple of fields on my main form that contain TRIMMED concatenated text.
Eg. Address: Trim ([Flat] & " " & [No] & " " & [Street] & " " &[Address1] & " " & [PCode]) which seem to loose their data and either show a blank field or “Name”.
When I first...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.