-
WSZAve
AskWoody LoungerIf you can see anything here I appreciate it.
This is the code on the onopen of the switchboard:Private Sub Form_Open(Cancel As Integer)
Dim varYatzig As Variant
Dim x As Variant
Dim dtNow As Date
Dim DtMax As Date
Dim rst As RecordsetOn Error GoTo errrorhandler
Set rst = New Recordset
Set rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenKeyset
rst.LockType = adLockOptimistic
rst.Open (“tblyatzig”)dtNow = Date
DtMax = DMax(“[dtYatzig]”, “tblyatzig”)
If dtNow > DtMax Then
varYatzig = InputBox(“
-
WSZAve
AskWoody LoungerGuess whatIt worked.
thanks HansZave Rudman
-
WSZAve
AskWoody LoungerThanks for the help.
the code breaks and it says that it is getting a null value.
I do not think that I have created a new record yet. I only create the new record if the result of the first part of the If-then is negative. Otherwise it is supposed to find the last record entered based on the previous DMax. AS i think I wrote it. If dtnow is geater than dtMax (in other words there is no record yet for today) then it opens an input box gets today’s rate from the user saves it into the table and sets the text box on the switchboard with that value.
If the max date in the table is today’s date then it closes the table that was opened, and tries to Dlookup the value in the table using dtmax as the criteria. At that point all I get is a Null value. If I remove the criteria from the Dlookup it will work, just it will return a random number.
I see what you mean about the currency and intyeger field, but that is not the problem here (I think).I hope this helps.
Thanks for the help. -
WSZAve
AskWoody LoungerThe simple way is to have a table that has 4 fields. one for each person’s AutoID, one for the type of relationship and one for a PK. Then to query it you link the main table to this table twice and you can get the info out.
-
WSZAve
AskWoody Loungerlook at the help for the orderby property. You can either make a message box that offers two choices and based on the response change the orderby property, or make a dialog form that gives you list box of choices and opens the report based on the choice.
There also a property that controls how the group is sorted that you can set.
I hope this helps -
WSZAve
AskWoody LoungerThe reason I did it with VBA is for a complete novice user, he can get the count easily, without having to open unfamiliar menus and potentially destroying his doc (no eees)
-
WSZAve
AskWoody Loungerthis works if anyone is interested. It is based on the helpful input of everyone who responded:
Public Sub howMany()
Dim strfind As String
Dim lngMany As Long
Dim lngBefore As Long
Dim lngAfter As Long
Dim lnghow As Longstrfind = InputBox(“Which Character would you like to search for?”, “Count”)
‘ this protects the original doc
Selection.WholeStory
Selection.copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)lngBefore = ActiveDocument.Characters.Count
StatusBar = lngBeforeSelection.find.ClearFormatting
Selection.find.Replacement.ClearFormatting
With Selection.find
.Text = strfind
.Replacement.Text = strfind & “#”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.find.Execute Replace:=wdReplaceAlllngAfter = ActiveDocument.Characters.Count
StatusBar = lngAfter
lnghow = lngAfter – lngBefore
StatusBar = lnghow
x = MsgBox(“The character ” & strfind & ” appears ” & lnghow & ” times”, vbInformation, “Results”)
ActiveDocument.Close (False) ‘to close the temporary doc that you opened.End Sub
-
WSZAve
AskWoody LoungerSeptember 19, 2002 at 9:59 am in reply to: Know a good, cheap Access ad-hoc report writer? (2000) #618015try the following:
Ezy Reporter Add-In for Access2002. The easy way to create Access output.
http://aadconsulting.cjb.net[/url%5D link activated by WendellB 19-Sep-02 04:58 MDT
tdambra@ozemail.com.au.There are versions for XP and 97. It is free. You have to see if it works for you.
-
WSZAve
AskWoody Loungermake your combo box have 2 columns. One the vendor name the other the concantenated address. The second column does not even have to show. Set the afterUpdate event to put the second column of the combo box in the appropriate field. i.e. me.cboShipTo.Column(1)
-
WSZAve
AskWoody LoungerSeptember 17, 2002 at 8:21 am in reply to: update table field with value in open form (Acc2000) #617416Is the problem that the field is not yet saved, since you did not leave the record? Maybe force the form to be saved, then it will recognize that record?
-
WSZAve
AskWoody Loungerdoes that mean that the relationship diagram and all the RI in the front end between the linked tables is irrelevant?
-
WSZAve
AskWoody Loungerthanks for the info
-
WSZAve
AskWoody LoungerI set up a system with a metrologic ms9500 with no problem. The only thing you need is a way to print the barcodes. There is an ocx called MAbry that is very good for automatically bar codes.
-
WSZAve
AskWoody LoungerI see Charlotte beat me to the answer to this issue. About splitting the name, you can use the Mid function to do that. Look in the Help how to do it.
-
WSZAve
AskWoody Loungerjust make sure that in the query for the people from the town, you add the linking field that links the two tables. Then build a query on that query and add the tranaction table, and make sure that in the QBE grid the table and first query are linked.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
*Some settings are managed by your organization
by
rlowe44
4 hours, 33 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
6 hours, 47 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
7 hours, 12 minutes ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
16 hours, 12 minutes ago -
AI slop
by
Susan Bradley
15 hours, 23 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
17 hours, 29 minutes ago -
Two blank icons
by
CR2
3 hours, 3 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 2 hours ago -
End of 10
by
Alex5723
1 day, 5 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
2 hours, 58 minutes ago -
test post
by
gtd12345
1 day, 11 hours ago -
Privacy and the Real ID
by
Susan Bradley
1 day, 1 hour ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
17 hours, 18 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
1 day, 15 hours ago -
Upgrading from Win 10
by
WSjcgc50
3 hours, 8 minutes ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
6 hours, 41 minutes ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
2 days, 7 hours ago -
The story of Windows Longhorn
by
Cybertooth
1 day, 18 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
2 days, 9 hours ago -
Are manuals extinct?
by
Susan Bradley
2 hours, 44 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
2 days, 18 hours ago -
Network Issue
by
Casey H
2 days, 5 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
3 days, 6 hours ago -
May 2025 Office non-Security updates
by
PKCano
3 days, 6 hours ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
3 days, 8 hours ago -
pages print on restart (Win 11 23H2)
by
cyraxote
2 days, 9 hours ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
3 days, 10 hours ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
3 days, 10 hours ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
3 days, 18 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
3 hours, 14 minutes ago
Recent blog posts
Key Links
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.