|
-
Jun 28th, 2007, 02:41 PM
#1
Thread Starter
Hyperactive Member
Access query QBE expr aliases popping up
I've written many queries in the Access QBE that reference linked tables.
Often, when I reopen a query many of the fieldnames are suddenly replaced with Expr1: OldName, Expr2: OldName2 etc.
Any idea why this is happening?
How to prevent it or how to fix it?
I assume it's got something to do with the remote (SQLserver) table structure changing, e.g. new fields added, but I religiously do the "update linked tables" thing.
Thanks, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Jun 28th, 2007, 05:23 PM
#2
Re: Access query QBE expr aliases popping up
Yes, its because the table definitions have changed and Access can not find the field. Aliasing changes can affect this too.
Adding fields to a table shouldnt affect your query but removing them will.
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 
-
Jul 18th, 2007, 08:36 AM
#3
Thread Starter
Hyperactive Member
Re: Access query QBE expr aliases popping up
Yes, you're right.
My major problem was that I automatically import files, e.g. from CSVs and XLSs using the TransferText & TransferSpreadsheet methods in VBA, but always to the same temporary table name, i.e. it's constantly changing structure.
If I happen to open one of the queries written for a particular input file after I've imported a different file, then the fields suddenly don't line up.
Thanks, DaveBo
"The wise man doesn't know all the answers, but he knows where to find them."
VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15
-
Jul 18th, 2007, 12:14 PM
#4
Re: Access query QBE expr aliases popping up
Well you may need to change your code to validate the fields are existing in the table so when the query runs its good. I dont know how you will be able to predict new fields to add in your query but perhaps its a manual intervention process solution only.
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 
-
Jul 18th, 2007, 04:40 PM
#5
Re: Access query QBE expr aliases popping up
If this is in a business environment, we charge customers a higher rate for data that has to be handled manually. It's amazing how many of them (and there are huge multinationals) supply us with consistent data after having a few of their submissions manually entered.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
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
|