-
WSAlexya1
AskWoody LoungerThat’s exactly the example I gave Judy above Charlotte… She says she’s getting a run time error (429)…
Works fine for me?… What do you think is going on there? -
WSAlexya1
AskWoody LoungerGood Morning Judy…
You can use the Application object in the button’s On Click event…
Dim appAccess As Object
Set appAccess = CreateObject(“Access.Application.8”) ‘this is for Access ’97… I’m pretty sure you’d have to use .9 in 2000 (don’t have it here to check… )or
Dim appAccess As Access.Application
Here’s a sample procedure I found in Access Help…
Sub DisplayForm()
Const strConPathToSamples = “C:Program ” _
& “FilesMSOfficeAccessSamples”Dim strDB As String
‘ Initialize string to database path.
strDB = strConPathToSamples & “Northwind.mdb”
‘ Create new instance of Microsoft Access.
Set appAccess = _
CreateObject(“Access.Application.8”)
‘ Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB‘ Open Orders form.
appAccess.DoCmd.OpenForm “Orders”
End SubHTH
-
WSAlexya1
AskWoody LoungerHi Dana…
I don’t know if you really want an Append Query or an Update Query… but that’s up to you to decide…
Either way, if the Start and End Date fields are of date/time data type, you can enter the following expressions into the query design:NewStartDate: “2002” & Right(CStr(Format([StartDate],”yyyy-mm-dd”)),6)
NewEndDate: CDate([NewStartDate])+1
(substitute your own field names)HTH
P.S. I just tried it myself… using an update query… and since both fields were date/time type in the table I had to change the expressions a touch… Try this…
NewStartDate: CDate(“2002″ & Right(CStr(Format([StartDate],”yyyy-mm-dd”)),6))
NewEndDate: CDate(“2002″ & Right(CStr(Format([StartDate],”yyyy-mm-dd”)),6))+1 -
WSAlexya1
AskWoody LoungerWhen you say that you can’t see it on the screen, are you talking about looking at the relationships window?
I’m using Access 97 and I’ve never needed to create relationships in code before, but I just looked it up in help and there is a Refresh method for the Relations collection… Have you tried using that after you append “rel” to the Relations Collection?
-
WSAlexya1
AskWoody LoungerOops… Sorry Hans… You beat me again…
-
WSAlexya1
AskWoody LoungerGood Morning…
I tried to get a Delete query to work for this, but no luck…
I found a way…. Maybe it’ll help, or at least give you some ideas…I opened the table in design view and added an autonumber field and named it ID…
I saved the table and all records showed an incremented number…
I then created a make table query… grouping all fields and using Max for ID…
Running this query gave me one record for each employee in a new table… and I just deleted the old one containing the duplicates…How does that sound?
HTH… -
WSAlexya1
AskWoody LoungerThat’s perfect Steve! Thanks a million!!!
And sorry for the confusion… Unfortunately it’s not my setup… I was hired as a database/application developer for this company… Now THAT I can do!…
However, all of a sudden I’m in charge of automating a ton of manual work being done in Excel…
AND I’m not supposed to request changes to the data coming in or change the format of the data going out… Isn’t that always the way?!?!In actual fact, this workbook contains 6 worksheets and numerous data ranges that need to be thrown in where needed in the final reports… I was trying to use INDEX but couldn’t quite get it… This solution is going to help me fix it all…
Anyway… Happy Friday!!… Thanks again!… -
WSAlexya1
AskWoody LoungerThanks Darren…
All you have to do is add an expression to the AfterUpdate event procedure for the combobox…
Something like this:If txtYourName “” Then
txtYourName = txtYourName & “, ” & cboYourName
Else
txtYourName = cboYourName
EndIfI don’t know what format you’re needing the output in, but I’ve attached a quick example I made…
It just has one table and one form… but hopefully it’ll help give you ideas and help get you started…Let me know if something doesn’t make sense…
HTH
-
WSAlexya1
AskWoody LoungerBefore I give you the wrong answer, could you clarify a couple of things?
- Are the combo box and text box on the same form?
- When you say “each click adds a further entry to the text box”…do you mean that it will overwrite the last entry into the text box?
or are you creating a list of data inside the text box?
-
WSAlexya1
AskWoody LoungerAssuming that you have the primary and foreign keys set up properly in your table design:
- Go to the relationships window
- Right click on the line joining the tables
- Select Edit Relationship
- Check “Enforce Referential Integrity” and check Cascade updates or deletes as necessary
[/list]That will create the one to many relationships for you…
If you get errors or if you don’t know about setting up the keys on the tables, let me know…HTH
-
WSAlexya1
AskWoody LoungerPerfect Legare! Thanks so much!
-
WSAlexya1
AskWoody LoungerThanks a million Hans… As usual I owe you big…
-
WSAlexya1
AskWoody LoungerTrent,
First of all… about the Search feature… see Post 250092
As for the two fields being combined into one… use the Concatenation character -> & to create a string…
(I don’t know whether you are using this in code or a query or what… This is some standard code… )If FirstName is John and LastName is Doe, the syntax and results should look something like this:
FullName = [FirstName] & ” ” & [LastName] … That’ll return “John Doe”
or
FullName = [LastName] & “, ” & [First Name] … That’ll return “Doe, John”HTH
-
WSAlexya1
AskWoody LoungerUhhhh… Wellll….
I guess I shoulda known that one…. Thanks ksnyder!
-
WSAlexya1
AskWoody LoungerThanks for letting us know bitram… I was watching for an answer on this one…
![]() |
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
-
How the Rudraksha Crystal Bracelet Transformed My Energy and Mindset (Awaiting moderation)
by
daivikcart
1 hour, 8 minutes ago -
LibreOffice 25.8. No Windows 7, 8/8.1, x86
by
Alex5723
1 hour, 10 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
13 hours, 21 minutes ago -
June KB5060842 update broke DHCP server service
by
Alex5723
11 hours, 53 minutes ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
15 hours, 55 minutes ago -
Excessive security alerts
by
WSSebastian42
11 hours, 36 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 1 hour ago -
Ben’s excellent adventure with Linux
by
Ben Myers
2 hours, 48 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
12 hours, 32 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
1 hour, 24 minutes ago -
OS news from WWDC 2025
by
Will Fastie
1 day, 2 hours ago -
Need help with graphics…
by
WSBatBytes
3 hours, 42 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
1 day, 16 hours ago -
Totally remove or disable BitLocker
by
CWBillow
15 hours, 59 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
19 hours, 14 minutes ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
2 days, 3 hours ago -
Search Forums only bring up my posts?
by
Deo
7 hours, 22 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
2 days, 15 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
2 days, 7 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
2 days, 15 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 2 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 3 hours ago -
Disengage Bitlocker
by
CWBillow
2 days, 17 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 days, 5 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
7 hours, 16 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
3 days, 12 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
3 days, 12 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
3 days, 16 hours ago -
New PC transfer program recommendations?
by
DaveBoston
1 day, 21 hours ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
3 days, 20 hours ago
Recent blog posts
- Ben’s excellent adventure with Linux
- Seconds are back in Windows 10!
- WebBrowserPassView — Take inventory of your stored passwords
- OS news from WWDC 2025
- Best tools for upgrading a Windows 10 to an 11
- Master patch listing for June 10, 2025
- 24H2 may not be offered June updates
- June 2025 updates are out
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.