-
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
-
Thunderbird release notes for 128 esr have disappeared
by
EricB
37 minutes ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
1 hour, 5 minutes ago -
Apple releases 18.5
by
Susan Bradley
1 hour, 24 minutes ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
2 hours, 31 minutes ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
3 hours, 9 minutes ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
10 hours, 5 minutes ago -
No HP software folders
by
fpefpe
10 hours, 50 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
3 hours, 2 minutes ago -
Stay connected anywhere
by
Peter Deegan
16 hours, 13 minutes ago -
Copilot, under the table
by
Will Fastie
7 hours, 26 minutes ago -
The Windows experience
by
Will Fastie
22 hours, 27 minutes ago -
A tale of two operating systems
by
Susan Bradley
13 hours, 23 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day, 3 hours ago -
Where’s the cache today?
by
Up2you2
1 day, 19 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 11 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
12 hours, 12 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 19 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 12 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 12 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 13 hours ago -
MS Passkey
by
pmruzicka
1 day, 15 hours ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 21 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 8 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 20 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 16 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
4 days, 1 hour ago -
AI slop
by
Susan Bradley
1 day, 19 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
4 days, 2 hours ago -
Two blank icons
by
CR2
1 day, 10 hours ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 12 hours 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.