i have a form that uses a text box to search through my bookings, and when the user double clicks on the record in the listbox it loads that record in my main booking form..
this works fine. the problem is this..
i will search and find a record using the text filter.. i will double click on the record and it loads in the booking form.
i then close the booking form, and the search form is still open in the background..
if i then click on another record in the search form, i get this message..
runtime error 3008, the table bookings is already opened exclusively by another user... etc
below is the code in my search form, is there anyway it can be edited to make sure this doesnt happen.
Option Compare Database
Option Explicit
Private Sub QuickSearch_DblClick(Cancel As Integer)
DoCmd.OpenForm "newBOOKINGS", , , "[bookingid] = " & Me![QuickSearch].Column(0)
End Sub
Private Sub Search_Change()
Dim vSearchString As String
DoCmd.Requery
Me.RecordsetClone.FindFirst "[bookingid] = '" & Me![QuickSearch] & "'"
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
MsgBox "Could not locate [" & Me![QuickSearch] & "]"
End If
I am trying to open TabCtl86 forms in AddData mode if there are no records in a table for a user chosen form cboClientSearch. The tab control has three pages on it. At the moment I am getting an error saying "the form named '0' is either misspelled or doesn't exist".
I am using this at the moment; DoCmd.OpenForm Controls!TabCtl86, acFormDS, , , acFormAdd, acDialog
I have small problem that I can't get access to edit my own database because the are constantly people using it. So is it possible to kick uses off my database so that I get exclusive to edit it?
I have company names in 2 tables to compare, but the data is slightly different but same companies. I want to know what companies are in one table but not in another. Here's an example:
Company Name in Table 1 = Virtual Micro Company Name in Table 2 = Virtual Micro Technologies
Same company, but the spreadsheet I imported for Table 2 had the full name for the company, so therefore they are not compared the same and the query result shows them to be different.
Do they have to be exactly the same, or can I compare a certain number of characters or somehow use the "like" criteria filter?
I have a VB6 project that connects to a Access database. I get a run time error when I try to copy the database as a backup - "You attempted to open a database that is already opened exclusively..."
I need to be able to copy this database while it is still open. How do I work around this?
I have two tables. The first contains details of a budget holders money allocation for a given period, and the other tracks their spend on products over that period. How can I generate a query to calculate the total running spend for each user from the "budget spend table" that will be written into the users record in the "budget allocation table".
My aim is to show details of budget allocation, total spend to date and remaining budget for each user in an Order form / report.
Can anyone please advise me on how to do this or suggest another way of doing it. Any help would be greatly appreciated.
Using Access 2007 DB windows 7..Main form on open of db collects the username from the environ. text Field(networkid) is populated on form from the function
1. On Open of DB it opens with a frmuserid which contains a text box holding the network ID which is derived from function fosusername() 2. The value of Forms!frmuserid!networkid (frmuserid! is the form that opens when the DB is 1st opened) is populated with the fosusername() in the networkid text box
I seem to only be having the issue of the db opeing with my network ID no matter who opens the db. Somehow I need to shut off that 1st ID when close db or update the form field on open.
is there a way to find out who has a record open and send him message or someting similar?It happens from time to time that some one has a record open (selected in a form) and then is doing other things while the record is locked and a second person can't do nothing to the record.
In access database, Is there anyone know how use macro to open a word document on a share drive..(example S:safetyRegulation.doc)?.
Here is what I did and it doesn't work.. Runapp command line: C:Program FilesMicrosoftOfficeOfficeWINWORD.EXE //S:safetyRegulation.doc. Is there any easier way to do this? Please advice..thanks Rob..
I have a crosstab query. users need to run the query for any week of a year. It is always a YTD query. I have used this process on many select queries. Will a crosstab query not support this simple method? See attached screen shots.
I think my issue is that when the user opens my form a record gets created. Thus default value will not work. what happens is; the user fills out form 1 goes to form 2 and on form 2 i want a check box default value to be true...but its always false.
the checkbox in question is adequite staff. the user gets the question, "was there adequate staff" if there was the "adequate staff box" would be true. what i have tried is i created a "dummy" checkbox (checkbox299) entitle no. and labled adequite staff checkbox as yes. on the form2 open insert the following
Code: If Me.ADEQUATE_STAFF = False And Me.Check299 = False Then Me.ADEQUATE_STAFF = True Else End If
I manage a fleet of vehicles at work with drivers assigned to these vehicles. Each driver may opt to pay a contribution for private use of these vehicles.
This can normally be done on an excel database, however, the drivers sometimes go on leave, so I need to put their payments on hold. At this time, other drivers may take over for that period or the vehicle is left at the office. Also, the drivers change their level of contribution from time to time, so I need to adjust that accordingly too.
When the driver takes over a vehicle they complete a form that has the contribution level (there are 4 to chose from) and the dates they will have it from. They always provide a start date, however, sometimes the end date is left open.
Sometimes, driver A will say something like 'From 1 Jan 2012 To Open' then driver B may take it for a week and say 'From 1 July 2012 To 1 August 2012'.
I want to know if Access is the right tool to produce the report with the current driver, and that it will revert back to the Driver A after 1 August?
I have a database that has a main form, and from that main form there are buttons that open their respected forms. I am curious as to how I control the size of all of my forms. They are all pop-ups at the moment. It all works fine on my monitor, but when opened on a smaller monitor it is too big and I can't even see the bottom of the screen. The main form is set to open automatically after the user logs into the database and it opens to fit the screen. also, all of my forms are modals.
Access 2007-10 Listbox created: List62 (I know I need to rename it, but for now) Multi-select: Extended Row Source Type: Field List Row Source: qryFieldList Open Query: qrySelectedFields (I added primary key to first column, just to have at least one destination field).
Goal: to select multiple fields within listbox, click on command button to open query "qrySelectedFields" with selected fields from list box.This is the code I have on the command_click:
Dim varItem As Variant Dim strSQL As String If Me.List62.ItemsSelected.Count = 0 Then MsgBox "Please select one or more fields.", vbExclamation, "Healthcare REIT" Me.List62.SetFocus End If
[code]....
It does absolutely nothing - doesn't add the fields to "qrySelectedFields", doesn't open the query, notta.
I have a split DB accessed and updated by several Users. How can I limit the update of one table to only one User, administrator if you will. :confused:
Query SELECT s.contracttypename, sum(s.sumrtr*v.pct) AS [predicted $] FROM sumrtr AS s, varcurve1 AS v WHERE s.mdiff=v.monthodr and s.contracttypename=v.contracttypename GROUP BY s.contracttypename;
I have varcurve1 varcurve2 varcurve3.... I want to provide a mean (interface?) for user to choose varcurve1 varcurve2 varcurve3 to run above query.
for eample if user choose varcurve1 the query will run
SELECT s.contracttypename, sum(s.sumrtr*v.pct) AS [predicted $] FROM sumrtr AS s, varcurve1 AS v WHERE s.mdiff=v.monthodr and s.contracttypename=v.contracttypename GROUP BY s.contracttypename;
if user choose varcurve2 the query will run
SELECT s.contracttypename, sum(s.sumrtr*v.pct) AS [predicted $] FROM sumrtr AS s, varcurve2 AS v WHERE s.mdiff=v.monthodr and s.contracttypename=v.contracttypename GROUP BY s.contracttypename;
I want to put a textbox on a form that will take user input (a postal code) and put it into a table. I'm not sure how to do this. Is it even possible, and if so, any suggestions?
I want to put a textbox on a form that will take user input (a zip code) and put it into a table. I'm not sure how to do this. Is it even possible, and if so, any suggestions?
Hi.I'm new to Access. I'd like to know how can I choose which table/form will open when I open the MS Access file from my desktop? And can I change it in the future? I have Office 2007.Regards,Kirret
My search was snowballed with lot of results about dealing with split database, seeing who's online, etc. so I'm not sure if that is a good idea.
I want to make a table of Users because my users may need to put their name on some of reports, so I could use CurrentUser() to figure out who's who and put down their proper name after comparing the username via a query.
However, I'm not sure if it's possible for me to link the user table to the user groups of database to ensure that there's no ghosts or users that doesn't have a proper name to be placed on the reports or whatever. More of a validation, really.
Is that doable or maybe there's another way to do that?