On the same tack, I use the # which drives an item to the top of the list out of the way. If it is a test or temporarily not used it has the # prefix. If it subsequently is used I remove the #. I also use the # prefix for filenames in Explorer to flag a temp or can delete file. Anything with an old date and the # I can delete without worry later.It's an old safety habit some of us use when remodeling an existing table schema. If a field will probably be dropped or modified, rather than physically delete it and swear at yourself later when you change your mind, you rename it that way. Once the final design is settled, "z____" stuff can be safely deleted. It also helps expose places in forms, queries, etc. where that field might have been used. They break immediately so, again, you can decide whether you really can drop or change the field, and where else you have to make changes.
I know there are also tools to analyze accdbs to find such usages. In this case, it's primarily the first reason.
if you still have autocorrect on then renaming it will adjust queries and forms accordingly. Safer to copy/paste and rename the copy with a z prefix, then delete the originalrather than physically delete it and swear at yourself later when you change your mind, you rename it that way.
Sorry, I'm not sure what you are asking about.we would be interested about how handle you
Hello GPG, I have a suggestion but am unsure where I should post for it to be passed on, so I've put it here. Although not directly about Northwind. If new users could set their code out in a more readable format, it may well help them. Sometimes VBA code in Access just looks like a mass of jumbled words, which is then far from easy to read in 12 days or 12 months time.We very much appreciate that feedback and suggestions. Not every idea can make it into the end result, of course, but the more we hear from working Access Developers, the more likely we are to hit the right notes.
In a simplfied example this is how Access formats the codein its own sloppy way
If Forms!F10Main.OneID10 = True Then '
Me.fVoyageFrom = DLookup("[BoundFrom]", "Voyages", "[ShipName] = '" & [Param107] & "'")
Me.fShipType = DLookup("[ShipType]", "Ships", "[ShipName] = '" & [Param] & "'")
Me.btnAdd.Enabled = False: Me.btntnAdd.Visible = True: Me.btn17 = 0: Me.btn21 = 77
Me.btnDelete.Enabled = False: Me.btnDelete.Visible = True: Me.btnUserNoSet = 0: Me.btnDepot = 0
Me.btnRefresh.Enabled = False: Me.btnRefresh.Visible = True: Me.fInvNum = mLastInvNo: Me.fRate = 0
Me.btnSet.Enabled = False: Me.btnSet.Visible = True: Me.CustID = mCustID: Me.fVAT = 17.50
Me.btnReCalc.Enabled = False: Me.btnReCalc.Visible = True
Me.btnPrinter.Enabled = False: Me.btnPrinter.Visible = True
Me.btnExit.Enabled = False: Me.btnExit.Visible = True
End If
At times due to the varying lengths of variables Access code can look a real jumbled mess.
In other langauges we can format code as follows to make it far easier to read.
If Forms!F10Main.OneID10 = True Then
Me.fVoyageFrom = DLookup("[BoundFrom]", "Voyages", "[ShipName] = '" & [Param107] & "'")
Me.fShipType = DLookup("[ShipType]", "Ships", "[ShipName] = '" & [Param] & "'")
Me.btnAdd.Enabled = False : Me.btnAdd.Visible = True : Me.btn17 = 0 : Me.btn21 = 77
Me.btnDelete.Enabled = False : Me.btnDelete.Visible = True : Me.btnUserNo = 0 : Me.btnDepot = 0
Me.btnRefresh.Enabled = False : Me.btnRefresh.Visible = True : me.fInvNum = mLastInvNo : Me.fRate = 0
Me.btnSet.Enabled = False : Me.btnSet.Visible = True : Me.fCustID = mCustID : Me.fVAT = 17.50
Me.btnNext.Enabled = False : Me.btnReCalc.Visible = True : me.fAccCode = mAccCode
Me.btnPrinter.Enabled = False : Me.btnPrinter.Visible = True
Me.btnExit.Enabled = False : Me.btnExit.Visible = True
End If
Thanks for the input. As you noted, not really part of this project. And, of course, there are alternative approaches to formatting code. Perhaps there will be some improvements, though, if the new Monaco editor ever sees the light of day. This will change.Hello GPG, I have a suggestion but am unsure where I should post for it to be passed on, so I've put it here. Although not directly about Northwind.
It is that in Access you cannot align your code to improve readability. The following code snips hopefully show what I mean:
Code:In a simplfied example this is how Access formats the codein its own sloppy way If Forms!F10Main.OneID10 = True Then ' Me.fVoyageFrom = DLookup("[BoundFrom]", "Voyages", "[ShipName] = '" & [Param107] & "'") Me.fShipType = DLookup("[ShipType]", "Ships", "[ShipName] = '" & [Param] & "'") Me.btnAdd.Enabled = False: Me.btntnAdd.Visible = True: Me.btn17 = 0: Me.btn21 = 77 Me.btnDelete.Enabled = False: Me.btnDelete.Visible = True: Me.btnUserNoSet = 0: Me.btnDepot = 0 Me.btnRefresh.Enabled = False: Me.btnRefresh.Visible = True: Me.fInvNum = mLastInvNo: Me.fRate = 0 Me.btnSet.Enabled = False: Me.btnSet.Visible = True: Me.CustID = mCustID: Me.fVAT = 17.50 Me.btnReCalc.Enabled = False: Me.btnReCalc.Visible = True Me.btnPrinter.Enabled = False: Me.btnPrinter.Visible = True Me.btnExit.Enabled = False: Me.btnExit.Visible = True End If At times due to the varying lengths of variables Access code can look a real jumbled mess. In other langauges we can format code as follows to make it far easier to read. If Forms!F10Main.OneID10 = True Then Me.fVoyageFrom = DLookup("[BoundFrom]", "Voyages", "[ShipName] = '" & [Param107] & "'") Me.fShipType = DLookup("[ShipType]", "Ships", "[ShipName] = '" & [Param] & "'") Me.btnAdd.Enabled = False : Me.btnAdd.Visible = True : Me.btn17 = 0 : Me.btn21 = 77 Me.btnDelete.Enabled = False : Me.btnDelete.Visible = True : Me.btnUserNo = 0 : Me.btnDepot = 0 Me.btnRefresh.Enabled = False : Me.btnRefresh.Visible = True : me.fInvNum = mLastInvNo : Me.fRate = 0 Me.btnSet.Enabled = False : Me.btnSet.Visible = True : Me.fCustID = mCustID : Me.fVAT = 17.50 Me.btnNext.Enabled = False : Me.btnReCalc.Visible = True : me.fAccCode = mAccCode Me.btnPrinter.Enabled = False : Me.btnPrinter.Visible = True Me.btnExit.Enabled = False : Me.btnExit.Visible = True End If
The basic problem is that you cannot tab or space the ':' Newline. Neither can you space out to align the '=' to force code into more readable lines. The cause is the fact that Variables and Expressions are not often the same length .
The only part of any Access code you can position along a line is a notes line prefixed with the ' which isn't helpful in showing 'tidy' code
Version number, e.g. Northwind 2, was considered, but it's not high on the feature list so far .I think time for a name change - too many versions all with the same name.
suggest include a version number in the name, perhaps related to the lowest version of access it would run under as a .accde (not suggesting it is supplied as a .accde)
some Suggested names from me:
beginners
tool up with access
All about access
Professionals
Access in depth
Go large with access