Northwind Services Template Macros help (1 Viewer)

SJS66

Registered User.
Local time
Yesterday, 18:08
Joined
Aug 8, 2017
Messages
26
Just wondering if this macros (see attachment) from the Northwind Services Web template Db can be modified or do you have to rewrite new code so it works offline instead of being a web based macros (ie desktop version vs web).

See previous post
https://www.access-programmers.co.uk/forums/showthread.php?t=267002&page=4
 

Attachments

  • Macro ClientOnlyUtilities.txt
    1.6 KB · Views: 143

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:08
Joined
Aug 30, 2003
Messages
36,123
I think that would work fine in a desktop app, though I'm not a macro user. It should also be modifiable. For a desktop app, I'd use VBA, as it's more flexible and powerful.
 

SJS66

Registered User.
Local time
Yesterday, 18:08
Joined
Aug 8, 2017
Messages
26
Thanks pbaldy. Any suggestions on learning resources for VBA? Had a look at that section of forum but that swimming pool is way too deep for me. I need to find the kiddies wading pool.
 

SJS66

Registered User.
Local time
Yesterday, 18:08
Joined
Aug 8, 2017
Messages
26

Excellent videos. I followed along building Steve's "Services Inc" database & all was great until I tried to make a "Go" button in the Form "frmForm". Mine button doesn't seem to work. I've also noticed since including the btnGo code, the "Select A Customer" drop down filter in frmCustomerAddresses doesn't work either. It seems to load the code for the btnGo instead for some reason.

I don't know what I did & can't seem to see any differences between mine & his.

I've zipped my version of the database and attached if anyone wants to look at it and see what's wrong.
 

Attachments

  • SJS_SteveBishop_ServicesInc.zip
    98.9 KB · Views: 135

jdraw

Super Moderator
Staff member
Local time
Yesterday, 21:08
Joined
Jan 23, 2006
Messages
15,379
I changed the code as follows. Hope it helps.
There was an orphan End Sub in the code???
Code:
Option Compare Database
Option Explicit


Private Sub btnGo_Click()
    Dim x As Integer, YesNo As Boolean
    x = 2
    If x = 2 Then
       YesNo = True
    Else
        YesNo = False
    End If
    Debug.Print Me.chkYesNO
    chkYesNO = YesNo
    Me.Requery
End Sub
 

SJS66

Registered User.
Local time
Yesterday, 18:08
Joined
Aug 8, 2017
Messages
26
Ahh, I see. It was the End Sub at the top under Option Compare Database that was causing issue.
Don't know how that got there. Thanks.
Quick question....in later videos, in VBA he puts a block in the code (red section) then runs the code with the little yellow arrow on left. How does he move the yellow arrow to run the code so you see result by hovering cursor over it? I can do the block and the arrow comes up but I have to move it by dragging it which doesn't run the code. How do you get the yellow arrow to move so it runs the code (steps through it)?
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:08
Joined
Aug 30, 2003
Messages
36,123
F8 to execute a single line, F5 to run to next breakpoint.
 

SJS66

Registered User.
Local time
Yesterday, 18:08
Joined
Aug 8, 2017
Messages
26
F8 to execute a single line, F5 to run to next breakpoint.

Thanks, classic, I jumped the gun, just got to video 34 where he explains this. Although he hasn't mentioned F5 (yet).

He probably should of explained this in the previous video where he uses it to step through code. I was dragging my little yellow arrow up & down & hovering the cursor whilst scratching my head at the same time. Who says men are no good at multitasking...lol.
 

Users who are viewing this thread

Top Bottom