-
WSDarsha
AskWoody LoungerI think I can get away without doing it (quite whatever it is).
The spreadsheet I’ve imported the data into is hideous beyond belief. There will be a fair amount of manual work for someone (somethings just aren’t possible for me to do). Whoever does that can sort out the ‘sorting’ I can’t (be bothered?) to fix. To be honest, the way I can provide the data can at least be checked easily to see if everthing is there. The re-ordering I was thinking of would actually make it harder to check!
-
WSDarsha
AskWoody LoungerThe query is sorted by 2 columns to get the overall proper order.
It’s actually a make table query (not entirely necessary but it helps keep me organised – this is related to my othe recent post with Excel DAO). I’d managed to then use a modify table query to add in a autonumber field.
Unfortunately, I ‘ve realised the ‘row number’ doesn’t actually help with the problem I have. I cant figure out how to actually explain my next question
Thanks again
-
WSDarsha
AskWoody LoungerThat’s disappointing
but good to know.
Thanks for the quick reply.
-
WSDarsha
AskWoody LoungerThanks, I don’t think it’s going to be as hard as I thought.
I found this https://www.planet-source-code.com/vb/scrip…=47409&lngWId=1%5B/url%5D and this http://www.aspfree.com/c/a/Database/Data-A…from-Excel-VBA/%5B/url%5D pretty helpful.
-
WSDarsha
AskWoody LoungerThat’s kind of what I’m after really.
I’ve tried various things and it almost looks ok with mimimal manual modification needed. Unfortunately, on closer inspection I’ve found on exporting a report with many subreports (each one as a column), the subreport data gets put in the same column in excel.
Fortunately, there are <500 records so even if I come up with some clunky inefficient code it shouldn't take too long to run it.
I think I need to do something with nested recordset loops, i.e first record, paste the columns into excel, move to query for 1st related table, paste data etc, somehow counting so I can move around cells in the worksheet using relative offsets.
-
WSDarsha
AskWoody LoungerNovember 12, 2008 at 2:03 am in reply to: Mimic look of ‘group header’ with label (2000/XP) #1132361Thanks
That seems to do the trick.
-
WSDarsha
AskWoody LoungerOctober 13, 2008 at 2:01 am in reply to: Link tables – to a db with non mdb file extension (2000/XP) #1128831Very interesting
Thanks
-
WSDarsha
AskWoody LoungerGlad to hear that!
I didn’t realise you could bring the same table into a query twice and use an incrementing ID to get data from the next record – I’ve always used recordset loops.
I’ve got 3.7 in my head so the table could be wrong or I could be wrong – it ‘s only something someone decided and they may well have changed their mind anyway.
Thanks again.
-
WSDarsha
AskWoody LoungerHans
1. I’ve modified the querys qryHiLo and qryLoHi to include the height values from adjacent rows, calculating the height difference (using abs when going from Low to High – I suppose I could have just swapped the order of the subtraction).
2. The height_diff field is pulled through into queries qryRising and qryFalling
3. In qryTide I’ve used an IIF statement with the criteria height_diff >=3.7 = ‘Spring’ otherwise Neap (just noticed this is different to th atrributes in tblTides but it doesn’t matter, I’ll just have to check the cut-off value)
I’ve re-labelled the headings to Tidal_Cycle (high, mid, low) , Tidal_Flow for (rising, falling) and Tidal_Phase (spring, neap)
Can you check my logic on this, particularly the first step – I’ve confused everyone in the office!
-
WSDarsha
AskWoody LoungerWow, that took me a while to figure out what’s going on there.
I also need to pull out whether the time is a spring or neap tide (listed as the phase attribute in the tide table), the cutoff was decided as being neap if the absolute height difference was 3.7m or greater.
I can’t figure out whether to try to use the attribute field or to try to work it out in as similar way to your qryHiLo and qryLoHigh by pulling in the same table twice and used the id + 1
edit: I’m just trying something now which looks sensible – I’ll post it here when I’m done
-
WSDarsha
AskWoody LoungerHans
I’m wondering if you could help me take this further. Attached is a sample database (actual data) with the original queries you wrote.
I’ve been asked to extract more information, namely the tidal phase (Phase) and whether the tide is rising or falling (falling – nearest tide event is HIGH and in the past OR low and in the future, rising – nearest tide event is low and in the past or high and in the future)
tblTides is real tide data, the date time column is [dt_bst], the tidal phase is [Phase]
tblSurveys are the actual survey dates – I have used the survey start date [SURV_DT_START] but may need to derive a halfway time between a survey’s start and end (surveys were carried out over a few hours). -
WSDarsha
AskWoody LoungerThat’s exactly what I’m after
Sorry for the delay in replying, I’ve just returned from my holiday.
I’m beginning to wonder if there’s a problem you can’t solve.
As always, many thanks
-
WSDarsha
AskWoody LoungerThanks Hans
I’m struggling a bit today – it’s rather hot in the office (and nearly home time!). Can you elaborate on the queries a bit – i.e what’s the reason for the <0.3 in qryDiff
I may also need (or rather the surveyors will need) to complicate matters.
I think they may want to know the following
time to nearest High
time to near Lowif either of these are say more than 1.5 hours away it'd be mid tidal, otherwise, obtain the nearest high/low as you example.
-
WSDarsha
AskWoody LoungerSeems happier with this
Me.Line (15, 0)-Step(0, (Me.Height) / 56.7), vbBlack
Me.Line (52.91, 0)-Step(0, (Me.Height) / 56.7), vbBlack
Me.Line (87.92, 0)-Step(0, (Me.Height) / 56.7), vbBlack
Me.Line (122.93, 0)-Step(0, (Me.Height) / 56.7), vbBlack
Me.Line (157.4, 0)-Step(0, (Me.Height) / 56.7), vbBlackand this for a line along the bottom
Me.Line (0, (Me.Height) / 56.7)-Step((Me.Width) / 56.7, (Me.Height) / 56.7), vbBlack, BStill confused with the DrawWidth property. I’ve read it’s supposed to be pixels but to get something approximating to a 1pt line I used DrawWidth = 15.
-
WSDarsha
AskWoody LoungerI think I’m going to have to see what happens when I actually get given some more data. I only have a few records to work with at the moment. I remember the first db I was involved in – it worked fine until the users entered data
I’m glad I’ve figured out table definition queries which, as the troublesome fields have a sequential numerical suffix, made it pretty easy to write a loop to create the sql for the table.
Thanks for the advice.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Who knows what?
by
Will Fastie
6 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
8 minutes ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
1 hour, 42 minutes ago -
Misbehaving devices
by
Susan Bradley
1 hour, 44 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
19 hours, 21 minutes ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
15 hours, 5 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
17 hours, 55 minutes ago -
Discover the Best AI Tools for Everything
by
Alex5723
18 hours, 4 minutes ago -
Edge Seems To Be Gaining Weight
by
bbearren
8 hours, 13 minutes ago -
Rufus is available from the MSFT Store
by
PL1
16 hours, 15 minutes ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
1 day, 19 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
1 day, 1 hour ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
21 hours, 42 minutes ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
1 day, 14 hours ago -
Office gets current release
by
Susan Bradley
1 day, 17 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
3 days, 7 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
2 days, 16 hours ago -
Stop the OneDrive defaults
by
CWBillow
3 days, 8 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
3 days, 18 hours ago -
X Suspends Encrypted DMs
by
Alex5723
3 days, 20 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
3 days, 20 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
3 days, 21 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
3 days, 22 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
3 days, 10 hours ago -
Enabling Secureboot
by
ITguy
3 days, 17 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
4 days, 5 hours ago -
No more rounded corners??
by
CWBillow
4 days, 1 hour ago -
Android 15 and IPV6
by
Win7and10
3 days, 15 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
4 days, 18 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
4 days, 20 hours ago
Recent blog posts
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.