-
Weyrman
AskWoody LoungerNevermind, I worked it out. It wasn’t as hard as I initially thought it was.
-
Weyrman
AskWoody LoungerMarch 2, 2022 at 3:40 pm in reply to: Access (office 365) backend in an inconsistent state issue #2428958Hi Paul,
Sorry to sound dumb but disable oplocks where? In access? In the file system? The NAS box?
The backend DB is in its own folder which is mapped to a drive letter for everyone.
-
Weyrman
AskWoody LoungerJim was right: IIf(GetUserInfo()<=7,([Rep]),GetUserInfo()) did the trick.
-
Weyrman
AskWoody Lounger -
Weyrman
AskWoody LoungerThanks for the input Wendell, I like the idea of tracking the version of components. It would be only for us 2 developers when we “commit” a new version (whole frontend db) to the server so that he doesn’t overwrite changes I have made.
I think I need code that checks the version of components between my copy and the master copy on the server and either imports and replaces newer objects from the server or at least lists newer objects so it can be manually done before my copy becomes the new master front end copy on the server.
So more details please 😀
-
Weyrman
AskWoody LoungerIt has an ethernet connection.
Will get new drivers
-
Weyrman
AskWoody LoungerThankyou Bob so much, most appreciated!!!!:clapping: I will study your code to try and understand where I was going wrong, I won’t just copy /paste, promise! 😀
I think the OP may also need to do more reading on the basics of how to use DAO and ADO in Access.
You are right, I do. I just don’t code continuously enough to keep what I know fresh in my head and sometimes, like this it just completely stumps me.:confused: This is part of an extensive application which has been built over many years with lots of commenting. Often I can look back to where I have used a process before and copy, paste, adapt with very little problem.
-
Weyrman
AskWoody LoungerI like to build and test queries one step at a time, rather than trying to build the entire query at once.
Get it working with a test suite of variables you provide, before hooking it up to the application.
Refer back to the link in post #8 on using SQL statements in DAO and ADO.
I looked at the link and understand the examples given but I don’t seem to be able to translate that principle into getting what I had. –I am SOOOOO annoyed at myself —
I normally build the sql in a query and then copy and paste without any issue. In fact the sql works perfectly in a query but not as a recordset string. As I do this only sporadically as well as being mainly self taught I have hit the wall on this one. I have wasted too many hours already trying to modify the sql again hoping to fluke it a second time. I’m sure its in the sytnax of the sql somewhere but its just beyond me at the moment to understand what.
Hence my posting this little database. –Insert hair pulling and banging head against a wall emoticons here —
-
Weyrman
AskWoody LoungerSadly I fluked this but then went on to another event before saving it, closed everything in a hurry and so lost it and now can’t remember what I did. I know its in the strSQL expression.
I have prepared a sample database to show my problem. the form is to show the jobs assigned to an employee in the order they are to be done. It keeps throwing an error as you will see.
Items in the table are entered from a different job screen.
When you open the form you should be able to select an employee in the dropbox and have the listbox filled with items from the table set for them. I want to do it this way because I want to be able to use the up and down buttons on the side to set the order of the jobs and then click the save button to set it, by writing priority numbers back to the table for when it is loaded next time.
This allows new jobs to be prioritized as needed.
Thanks in advance to anyone willing to have a look
-
Weyrman
AskWoody LoungerDo you have Dim rst As Recordset defined somewhere?
I also like to build SQL string variables like this…
strSQL = “SELECT tblAllocate.ID,
[INDENT][INDENT][INDENT]tblAllocate.JobID,
tblAllocate.Dept,
tblAllocate.Hours,
tblAllocate.Location,
tblAllocate.Comments ” [/INDENT] [/INDENT][/INDENT]
strSQL = strSQL & “FROM tblAllocate ”
strSQL = strSQL & “WHERE(((tblAllocate.Emp)=[Forms]![frmJobAllocationPage]![cboEmployees]) ”
strSQL = strSQL & “AND ((tblAllocate.Completed)=False)) ”
strSQL = strSQL & “ORDER BY tblAllocate.Priority WITH OWNERACCESS OPTION;”Much easier to read for the person who has to maintain the code.
Access won’t let me do it. It keeps putting quotes after the first line
strSQL = “SELECT tblAllocate.ID,”
You can also try breaking up the statement:
strSQL = “SELECT tblAllocate.ID, tblAllocate.JobID, tblAllocate.Dept, tblAllocate.Hours, tblAllocate.Location, tblAllocate.Comments FROM tblAllocate ”
strSQL = strSQL & “WHERE (((tblAllocate.Emp)=[Forms]![frmJobAllocationPage]![cboEmployees]) AND ((tblAllocate.Completed)=False)) ”
strSQL = strSQL & “ORDER BY tblAllocate.Priority WITH OWNERACCESS OPTION;”Thanks RG, that is a better way!
Debug.Print strSQL
OK I am getting the full strSQL string (must remember that)
strSQL=CurrentDB.QueryDefs(“qrySelect”).SQL
I tried this. If I copy and paste the sql into a new query the query runs just fine but when I call it using the above code I get an error 3061 (Too few parameters. Expected 1.)
I looked up this error and it may be that I need single quotes somewhere but I have no idea where.
It’s got me stuffed!
the underlying table has the following fields
ID:Autonumber
JobID:Number
Emp:Number
Dept:Text
Hours:Number
Comments:Memo
Priority:Number
Completed:Number
Location:Texthere is the code block in full
Code:Private Sub cboEmployees_AfterUpdate() Dim strSQL As String Dim rst As Recordset On Error GoTo cboEmployees_AfterUpdate_Error ‘strSQL = “SELECT tblAllocate.ID, tblAllocate.JobID, tblAllocate.Dept, tblAllocate.Hours, tblAllocate.Location, tblAllocate.Comments FROM tblAllocate ” ‘strSQL = strSQL & “WHERE (((tblAllocate.Emp)= [Forms]![frmJobAllocationPage]![cboEmployees]) AND ((tblAllocate.Completed)=False)) ” ‘strSQL = strSQL & “ORDER BY tblAllocate.Priority WITH OWNERACCESS OPTION;” Debug.Print strSQL; qryAllocated strSQL = CurrentDb.QueryDefs(“qryAllocated”).sql Set rst = CurrentDb.OpenRecordset(strSQL) With rst .MoveFirst Do Until rst.EOF lstJobs.AddItem tblAllocate.JobID & “;” & tblAllocate.Dept & “;” & tblAllocate.Hours & “;” & tblAllocate.Location .MoveNext Loop End With On Error GoTo 0 Exit Sub cboEmployees_AfterUpdate_Error: MsgBox “Error ” & Err.Number & ” (” & Err.DESCRIPTION & “) in procedure cboEmployees_AfterUpdate of VBA Document Form_frmJobAllocationPage” End Sub
-
Weyrman
AskWoody LoungerThanks for your continued input. I have been a reader of this forum for almost as long as I have been building/maintaining this database and came across the frontend/backend concept early and have been running like this for many years. I used code I found along with version numbering to keep my frontends current. Each time I commit a change the version number is updated in the backend and my frontend and my frontend is copied to the NAS box. It also writes a copy of the old frontend to a storage folder in case I need it. Each frontend checks its version number against the backend on startup and if needed, writes and launches a bat file which closes the frontend, copies a new frontend version in from the NAS box and then launches it and then deletes itself on completion. (thanks to Renaud – http://blog.nkadesign.com/microsoft-access/)
I currently have backup software that copies the backend database to usb media (1 for each weekday) as well as being copied to dropbox each night (its only 86MB in size) and a portable HD once a week, so I am well into the routine of that.
One of the reasons this database exists was because we couldn’t find software that did what we wanted. The manufacturing software we looked at seemed to be geared towards large scale production and inventory where most of our stuff is one off and material is bought per job. In most cases, 6 off is a major run for us.
When I first started we were part of a larger company who used us as a cash cow. They kept raking the money out while putting only the bare minimum back in. They did introduce computers with Office 97 with Access and the 1 day access training showed me the answer to the frustrations I was having with Excel. The foreman was willing to let me have time to see what I could contrive and it went from there.
Keeping track of hours was our first reason. Being access, customer job history then just became available, then delivery dockets were added, then quote forms using a shared items table and then QODBC to give us read access to Quickbooks to be able to pull purchase orders and costings for a job and then many little tweaks along the way to create something that suits us and how we work.
Question: Wendel, do I really need dedicated server software to run SQL Server Express on? (it runs on win7) I realise I need a server machine but as all our web hosting and email is done via our IP provider and that the Backend is the only shared file we have do I need server software?
From reading elsewhere, the fact that sql server does things there and then feeds you the answers rather than grabbing the whole table and then filtering it certainly sounds like there are definite advantages. I will certainly start looking into the workings of SQL Server, I’ve even come across an Australian SQL Usergroup forum. So, onward and upward!
-
Weyrman
AskWoody LoungerThanks for your reply. After a thorough readthru of your post I agree that option 1 is the best way to go and what I had in mind.
Considering the info given, would SQL Server Express be enough for my needs?
As for server software, would either of these be suitable:
Microsoft Server 2008 Foundation 64bit R2 ($99)
Microsoft Server Essentials 2012 R2 ($595)or would I need
Microsoft Windows Server Standard 2012 R2 64bit ($995)
My local store has this on offer as a starter.
ASUS RS300-E7/PS4 Intel Server ($1995)
I’ve seen many, many user-developed databases start up. Usually the person (and the skill set) depart in time, and the database loses it’s prime mover.
This comment truly reflects our situation and while (all going well) I expect to work here until retirement (15yrs) I would like to futureproof as much as possible. We are an engineering workshop that has benefited greatly from my interest and assisted (thanks guys) ability to grow the database from its initial premise to the wide ranging tool it has become and I would hate to see it fall over because I was gone.
-
Weyrman
AskWoody LoungerThanks Wendel for your insight.
My situation is: This is part of my Job card procedure.
A card is raised and items are added to the job using a subform and items table. In a perfect world the user may decide to create a multicard job and so will set an option and enter the first item as a summary line and then the items. What happens is that eg a gearbox comes in and a card is raised to book strip and inspect to, the job is quoted and items of work are added to the job. Depending on the scope, it may turn into a multi card job but may not. If it is, my multicard summary item needs to be the first item.I realise that any new record will be written to the bottom of the table so this is what I am looking at now after some more browsing.
Write the existing recordset for the subform to a temporary table then add a new record to the underlying table and refresh the recordset.
Open the temp table and .movelast
Open recordset and .movelast
write field data from temp to recordset
.moveprevious on both tables
repeat until reach top record of temp table
.movefirst on recordset and clear fieldstop record is now clear for summary
I hope to use the following combined code from examples off the net (adapted)
Code:Private Sub TestTemp() On Error GoTo ErrorHandler Dim strSQL as String Dim strTable as String Dim RSC as recordset Dim RS as recordset strTable = “tblTempTest” ‘Delete the table if it exists DoCmd.DeleteObject acTable, strTable strSQL = “Select * INTO ” & strTable & ” FROM tblCustomers ” & _ <<<< How do I write the SQL to be from me.sbfItems.Form.Recordset "Where CustomerState = 'ILL'" Currentdb.Execute strSQL Add a record to the underlying table and requery set RS = me.sbfItems.Form.Recordset Set RSC = currentdb.Openrecordset("tblTempTest) RS.MoveLast RSC.MoveLast While Not RSC.BOF RS.edit RS![Field1]=RSC![Field1] RS![Field2]=RSC![Field2] etc. RS.Update RS.MovePrevious RSC.MovePrevious WEnd RS.Close RSC.Close Exit Sub ErrorHandler: IF Err.Number = 7874 Then Resume Next 'Tried to delete a non-existing table, resume End If End Sub
Is this feasible and/or advisable?
Regards,
Allan
-
Weyrman
AskWoody LoungerJanuary 12, 2015 at 6:44 pm in reply to: devices connected to home network wifi cannot see network assets #1484349I discussed this with my ISP and they are providing a replacement wifi-modem-router, hopefully this solves the problem.
-
Weyrman
AskWoody LoungerDecember 12, 2014 at 4:36 am in reply to: devices connected to home network wifi cannot see network assets #1479949OK, the wired network connects 3 computers, nas box, ethernet printer, tv, 2 game consoles and the extender box to the modem/router via a 16 port smart switch. The wireless router/modem and the extender use the same wireless channel and SSID and the laptops, smartphones and ipad connect to whichever signal is closest.
So, the printer is connected to the wired network and devices connecting to the network via the wireless extender can access the printer but devices connecting to the network via the wireless router/modem cannot.
It feels as if the modem/router wireless only allows internet connection but not LAN connection.
![]() |
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
-
Firefox 137
by
Charlie
1 hour, 17 minutes ago -
Whisky, a popular Wine frontend for Mac gamers, is no more
by
Alex5723
4 hours, 45 minutes ago -
Windows 11 Insider Preview build 26120.3863 (24H2) released to BETA
by
joep517
4 hours, 57 minutes ago -
Windows 11 Insider Preview build 26200.5551 released to DEV
by
joep517
5 hours ago -
New Windows 11 PC setup — can I start over in the middle to set up a local id?
by
ctRanger
1 hour ago -
Windows 11 Insider Preview Build 26100.3902 (24H2) released to Release Preview
by
joep517
8 hours, 31 minutes ago -
Oracle kinda-sorta tells customers it was pwned
by
Nibbled To Death By Ducks
14 hours, 33 minutes ago -
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
1 day ago -
Office apps read-only for family members
by
b
1 day, 3 hours ago -
Defunct domain for Microsoft account
by
CWBillow
1 day ago -
24H2??
by
CWBillow
14 hours, 32 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
8 hours, 46 minutes ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
9 hours ago -
TotalAV safety warning popup
by
Theodore Nicholson
56 minutes ago -
two pages side by side land scape
by
marc
3 days, 1 hour ago -
Deleting obsolete OneNote notebooks
by
afillat
3 days, 3 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
2 days, 6 hours ago -
Security Essentials or Defender?
by
MalcolmP
2 days, 9 hours ago -
April 2025 updates out
by
Susan Bradley
4 hours, 2 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
2 days, 2 hours ago -
WARNING about Nvidia driver version 572.83 and 4000/5000 series cards
by
Bob99
1 day, 16 hours ago -
Creating an Index in Word 365
by
CWBillow
2 days, 18 hours ago -
Coming at Word 365 and Table of Contents
by
CWBillow
1 day, 7 hours ago -
Windows 11 Insider Preview Build 22635.5170 (23H2) released to BETA
by
joep517
3 days, 22 hours ago -
Has the Microsoft Account Sharing Problem Been Fixed?
by
jknauth
4 days, 1 hour ago -
W11 24H2 – Susan Bradley
by
G Pickerell
4 days, 3 hours ago -
7 tips to get the most out of Windows 11
by
Alex5723
4 days, 1 hour ago -
Using Office apps with non-Microsoft cloud services
by
Peter Deegan
3 hours, 25 minutes ago -
I installed Windows 11 24H2
by
Will Fastie
2 days, 1 hour ago -
NotifyIcons — Put that System tray to work!
by
Deanna McElveen
4 days, 7 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.