-
WSJulesG
AskWoody LoungerChristopher,
OK, a multi-field link is rarely a good idea, but putting that to one side…..
On your subform, add three controls, one for each missing data element. Bind these controls to the underlying data. Set the default value for each to the relevant data from the main form.
When you add a new record, the defaults should be picked up and saved. The controls do not need to be visible, I would tend to make them visible while debugging.
Hope this helps,
Jules
-
WSJulesG
AskWoody LoungerGary,
I’m not sure of the exact scenario you describe. Simple answer, an after update would open a query to find the team responsible for the item. If a team is found, the message box can be opened (or a control on screen can display the name of the person/team – less annoying for the data entry person). Is this enough help?
More complicated answer – are you trying to prevent the data processing team from working on a record at the same time as another team? If so….
Firstly, you need to be able to identify that the record is being edited. A simple locking mechanism would write the name/ID of the editor, plus the date and time, into the record that is being edited. Clicking on Save or Cancel then deletes the locking data. One of the first actions under the Edit button would be to check the locking fields, and only allow editing if the field is empty.
An Admin screen to unlock these records is often also necessary, to cope with power failures or Ctl-Alt-Del leaving the record in a locked state.
Now, the system knows if the record is in use. As you say, an After Update event could check the record and bring up the name of the person who locked it.
Hope this is of use.
Regards,
Jules
-
WSJulesG
AskWoody LoungerBen,
You need to decide if you are referencing a value in a control on the ‘main form’, or whether you are referencing a value in the forn’s underlying recordsource. Either way will work. Use =Forms!FrmMain!txtID (assuming standard naming convention for the control), or =Forms!FrmMain![ID]. There are other methods, such as passing the ID to the new form as an argument (try the OpenForm wizard for an example, found by adding a new command button to the form). Another way is to store the ID in a global variable.
Then you should look at what you are doing with the ID value. It would help if we had the full error message, but it sounds as if you are trying to tinker with an Autonumber/seed value instead of filtering on /searching for the number. Have a good look at this area, and if you still see an error make a note of the error number and message. The error message will probably pinpoint the problem.
Regards,
Jules
-
WSJulesG
AskWoody LoungerLee,
here’s a link to an article that highlights how Excel occasionally cannot add 2 plus 2 to make 4.
It’s all to do with Excel not using real numbers to add up with (or something like that!). As you say, rounding should fix the problem.
Jules
-
WSJulesG
AskWoody LoungerLee,
another example of Excel not doing what you expect. I have not checked all your formulas, but I did change the formatting on cell C3 to Number, squintillion decimal places. This showed that Excel was calculating a value of n.050000001. So, this did not match your target of n.0500000000.
Ok?
Jules
-
WSJulesG
AskWoody LoungerHi Christopher.
You posted: When the button on form 2 is clicked it should alter the source object of the subform on form 1, and then requery it.
Your code uses ‘Me’ which only refers to the current form. You need to explicitly refer to the first form, as an object in the Forms collection. Try using forms!formname!frmsubresult.sourceobject
Regards,
Jules
-
WSJulesG
AskWoody LoungerAndy,
it sounds as if your database falls foul of compatibility issues. We get so used to new versions of Office opening earlier versions seamlessly, that it is easy to forget it is not always the case.
Have a look at Compatibilty to see Microsoft’s own list of issues.
If this is the cause of the problem, I don’t envy you the task of stripping the modules or worksheets out one at a time, but hey, somebody’s gotta do it!
Regards,
Jules
-
WSJulesG
AskWoody LoungerAt first glance, that’s a weird one!
Is the form Single View or Continuous View? If the latter, then yes, it will give the symptoms you describe. List boxes do not work in anything like the same way as combo boxes. I’d suggest you consider changing to a combo box. Much easier to control in these circumstances.
Regards,
Jules
-
WSJulesG
AskWoody LoungerPaul,
two aspects. First may just be a matter of finding the right words. Do you really mean that you want to set values in a query, or are you trying to limit the records shown on the report, by applying criteria? I’ll assume the latter.
So, If you are trying to apply a Where clause to the report, then you need an extra comma before your clause. It’s currently in the named filter position.
Then, you need to get the syntax right. Easiest way is to prepare a Select query using the normal query designer, then copy the part of the SQL Statement that you need. In this case, it is more likely to look something like “([Applydate] Is Not Null) And ([Appwithdrawal] Is Null)”. You will of course need both fields in the recordsource of the report, even if they are not shown in the printed report.
Hope this helps put you on the right track.
Regards,
Jules
-
WSJulesG
AskWoody Lounger -
WSJulesG
AskWoody LoungerTry putting a stop on the code in your function. This might give you a clue as to what is happening. Gut feeling is that there is a messagebox open but hiding behind something.
I use docmd.close acform, me.name
Regards,
-
WSJulesG
AskWoody LoungerJudy,
Not my area of expertise, but it looks as if you are trying to use a DOS command within VBA. When I’ve had to copy files in the past, I’ve set a variable to a FileSystemObject, e.g. Dim objFSO as FileSystemObject. Then, the methods such as objFSO.CopyFile become available.
Hope this helps,
-
WSJulesG
AskWoody LoungerTom,
Helen Feddema has an add-in that might help you. It is available at:
http://www.helenfeddema.com/CodeSamples.htm
Try download no. 20.
Regards,
-
WSJulesG
AskWoody LoungerI have a frmReservationEntry whose data source is qryCustomerSorted. Among the fields on the form are CustomerStatus, CustomerID, ReservationNumber (alphanumeric field), ResBegDate, ResEndDate. There are 7 CustomerStatus codes.
When entering data, I want to perform some validation tests.
1. If CustomerStatus is any of the 1st five fields, I want to prevent any entry into the ReservationNumber, ResBegDate, and ResEndDate fields
2. If CustomerStatus is 6, I want to insure that the ReservationNumber is 11 characters long.
3. If CustomerStatus is 7, I want to make ReservationNumber equal to the CustomerID number
4. If ReservationNumber is populated, then dates must be entered into ResBegDate and ResEndDate fieldsAny suggestions as to the best place to perform these tests and the syntax would be greatly appreciated.
Tom
Tom,
1. After Update event of CustomerStatus control. Syntax should be very simple, to disable the other fields. You may also need an On Current event.
2. Before Update event of ReservationNumber control. If cmbCustomerStatus = 6 then…….If nz(LEN(txtReservationNumber))11 then…
3. As 1.
4. Form’s Before Update event is probably the best place.Regards,
-
WSJulesG
AskWoody LoungerPatt,
I would guess you do not want to lose the ID from Access because other data is linked to it. You may need to add an extra column to your SQL Server table for ‘old ID’, and import the Autonumber data into this field. Then, run update queries on your linked tables to replace the old ID with the new ID. A query that includes the two tables, with a link between the foreign key field in your ‘slave’ table and the ‘old ID’ field in the master table, is one approach. Have the query update the foreign key field to the new SQL Server Identity value.
A bit longwinded, and must be repeated for every linked table, but it works.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
Office gets current release
by
Susan Bradley
4 hours, 31 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
9 hours, 54 minutes ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
6 hours, 38 minutes ago -
Stop the OneDrive defaults
by
CWBillow
10 hours, 42 minutes ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
20 hours, 38 minutes ago -
X Suspends Encrypted DMs
by
Alex5723
22 hours, 50 minutes ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
23 hours, 8 minutes ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
23 hours, 45 minutes ago -
OpenAI model sabotages shutdown code
by
Cybertooth
1 day ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
12 hours, 32 minutes ago -
Enabling Secureboot
by
ITguy
19 hours, 32 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
1 day, 8 hours ago -
No more rounded corners??
by
CWBillow
1 day, 4 hours ago -
Android 15 and IPV6
by
Win7and10
17 hours, 50 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
1 day, 20 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
1 day, 23 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
1 day, 17 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
2 days, 6 hours ago -
May preview updates
by
Susan Bradley
1 day, 18 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
1 day, 9 hours ago -
Just got this pop-up page while browsing
by
Alex5723
1 day, 22 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
1 day, 19 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
22 hours, 5 minutes ago -
At last – installation of 24H2
by
Botswana12
2 days, 22 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
18 hours, 52 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
3 days, 10 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
1 day, 8 hours ago -
Limited account permission error related to Windows Update
by
gtd12345
3 days, 23 hours ago -
Another test post
by
gtd12345
3 days, 23 hours ago -
Connect to someone else computer
by
wadeer
1 hour, 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.