Record Lock Status & Exist Query

Feb 12, 2007

Afternoon.

I have had a search through the forum however am unable to find anything...

I have two questions:

a) How do I check whether someone else is currently accessing a record / form?


i.e. Opening the form (SchemeDetails) like this:

DoCmd.OpenForm "SchemeDetails", acNormal, "", "", acEdit, acNormal
Forms!SchemeDetails.SetFocus
DoCmd.GoToRecord acForm, "SchemeDetails", acGoTo, tempVal

Can I check if someone else is in the specified record before I open it? Record Locking is (deliberately) set to "No Locks".

b) How do I check to see if a table exists?

i.e. If DataTable2.Exists = True then ...
Or something like this?


Hope someone can help me!

View Replies


ADVERTISEMENT

Modules & VBA :: Show Lock Status Of A Record When Other User Is Editing Data?

Mar 27, 2015

I have a form and I want show a message on the form when the it is locked as another user is editing the data in a particular record.

I know the record selectors show the records lock status but it a very tiny symbol which will mean nothing to the users of the database and anyway I don't want record selector bar on the form. How I would do this???

View 2 Replies View Related

Forms :: Combo Box Search - If Record Not Exist It Will Display Msgbox To No Record Found

Oct 28, 2014

I have a problem with my database I have a combo box that will search for my record. Actually its working I input the specific number it goes to the specific record. But I want, if there no existing record in my database it will display a Messagebox that "No record Found" I try to put a code in a macro builder in a after update property field but nothing happened.

Expression code that it will display the msgbox if there's no record found.

the given code from macro builder is attached. I try to have an if else statement but I dont know how to not equal that giver conditional expression.

View 10 Replies View Related

Modules & VBA :: New Record Error When No Record Exist

Dec 12, 2014

What I've done is setfocus from another subform to this subform, and I want to add a new record. I've got my code mixed up somewhere along the line as it's saying "the command or action 'RecordsGoToNew isn't available now.I'm trying to setfocus to this form, create a new record and setfocus to a field within the focussed form.

The code I'm currently using is...

Forms!frmtopline!frmTopLineSub.SetFocus
RunCommand acCmdRecordsGoToNew
Forms!frmtopline!frmTopLineSub.Form!TransactionDat e.SetFocus

View 2 Replies View Related

Check To See If A Record Exist

Nov 27, 2007

I would like help with a macro that looks to see if a record in my database table exists, then if it doesn't it adds a record with my data, but if the records does exist, it stops the routine and sends a message box to prompt if you want to continue with adding a new record.

The problem that I'm having is that my macro errors out when it doesn't find a record. I just want my macro to just see if a record exists or not. Then I can write my Iff statements based on whether it finds our or not. How do I just have my macro check for an record, then if it doesn't exist tell that it doesn't exist and not stop my macro. Is there some kind of IfExist() function or something?

Thanks for any help anyone can give me.

View 4 Replies View Related

If Record Doesn't Exist

Feb 21, 2005

I'm using the following code to autofill the city and state on my form.
I can't figure out how to capture if there is no matching record in the table.
If there is no matching record, I will:

1) inform the user with a msgbox
then if the user wants
2) open a form to add the record to the table


Dim rst As DAO.Recordset
Dim db As DAO.Database

Set db = CurrentDb
Set rst = db.OpenRecordset("tblZipcodes", dbOpenTable)



rst.MoveLast
rst.MoveFirst

Do Until rst.EOF

If strZipLookup = rst!ZipCode Then
Me.txtCoCity = rst![ZipCity]
Me.cboCoSt = rst![ZipState]

End If

rst.MoveNext

Loop

rst.Close
End If

How can I capture if there is no matching record in the table?

Thanks,

Sup

View 2 Replies View Related

Record Source Does Not Exist

Oct 7, 2004

I have set up a simplified event booking procedure, similar to the one generated by the access event manager wizard. It uses three tables, one with attendees details, one with the event details and abooking table that links the attendee ID with the Event ID.

The booking table uses commands similar to SELECT[Names + Contacts].[ID],[Names + Contacts].[Surname]FROM[Names + Contacts] to generate drop down lists of surnames and events so that the two can be matched together.

This works fine as a table.

However when placed into a form, whenever the form is opened I get an error message saying the record source specified on the form does not exist.

I have tried regenerating the form, etc. I have used a wizard to generate the form, closed the form, not changed anything in the database and then tried reopening it and I get the error message, can anyone shed any light?

Also if you accept the message then it knows how many records there are, so it must know there's something behind it, also if you change to design mode and then back to form mode, it finds all the data.

View 4 Replies View Related

Find A Record That Doesn't Exist

Oct 26, 2005

I have a training database with multiple courses. Certain staff do course1 and thereafter course2. Course1 is only done once and course2 is a refresher done annually. I want the query to find staff that have done course2 but not course1.

Thanks.

View 3 Replies View Related

Getting Record Status From A History Table

Oct 22, 2007

Dear All,

I have a MAIN table which stores the most recent info of a record with
following details:

Unique_Ref_Num|Status|Dept
1 |6 | 1

and a second table called history which records changes in the main table

HistoryID | Status | DateStamp
1 | 1 | #22/10/2007 09:00#
1 | 2 | #22/10/2007 09:01#
2 | 1 | #22/10/2007 09:05#
2 | 2 | #22/10/2007 09:06#
1 | 2 | #22/10/2007 11:00#
2 | 3 | #22/10/2007 15:00#
1 | 3 | #22/10/2007 16:00#
2 | 2 | #22/10/2007 16:10#


Where Status 1 = Open, 2 = Allocated and 3 = Closed.
----------------------------------------------------------------------------------------------
I want to get the count of number of queries which are not closed
(outstanding) at any point in time.

Example: (with a time parameter)
Input | Result
22/10/2007 17:00 | 1
22/10/2007 16:05 | 0
22/10/2007 14:00 | 2

I want to achieve this with just 1 query (not by using one query within the
other) b,coz I want to further use this query from Excel VBA (write through
Excel VBA and not store the query within Access)

Any help will be greatly appreciated
--

Many Thanks
Baapi
:confused:

View 4 Replies View Related

Progress Status For Record Completetion...

Dec 4, 2006

hi everyone,

just wondering if it was possible to have a box that returns the % completion of the current record depending on how much data/how many of the fields of the record have been filled out.

e.g. fields with containing data / total number of fields * 100

possible or not? if so...how is it done?

thanks, james

View 4 Replies View Related

Queries :: Latest Record If Status Is AA?

Dec 22, 2014

I have a query with a record id, report date and status.

How do I pull the latest record if the status is AA?

For latest record in report date I used Max in Totals. With just this max it is pulling the latest date for each set of records with the same record id.

This is a start now how do i pull the latest record that has a AA status?

View 14 Replies View Related

How To Record Length Of Time With Status Value Of 3

Mar 20, 2013

I have a database which contains a field 'status'. This status takes a numerical value (1, 2, 3, etc...). Everything works great.

What I want is to monitor the length of time a field spends on particular status. Specifically, I want to record the length of time that the record spends with a status value of 3. So if the record has its status changed to 3, the system 'starts the clock' and once the status changes away from 3, the system 'stops the clock'. This must also continue if the status subsequently returns to 3 at a later date (for the same record) and cumulatively produce the total amount of time that the record spent on status 3.

Practical example

March 19th: Record is set to status 3 (for the first time)
March 21st: Record is set to status 1
March 25th: Record is set to status 3 (again)
March 27th: Record is set to status 2

In this scenario, I want visibility that the record has spent four days on status 3 altogether. I don't need exact times (nearest day will do). Ideally the system will only count working days (although this is not a must-have).

View 2 Replies View Related

Delete Record Only If Child Records Don't Exist

Aug 6, 2005

Hi,

I'm trying to have a button on a form that would delete a record from a table only if there are no child records linked to it.

If there are child records for the selected record, the button would be disabled.

Is there a simple way of doing this?

TIA.

View 3 Replies View Related

Append If Record Doesnt Exist, Else Update

Feb 19, 2008

I have a table that is filled based on selections that a user makes in combo boxes on a form. I am having trouble trying to figure out the best way to prevent duplicates from being inserted in the table when I do the append query part.

Since the table is filled based on the various selections the user makes I dont have a primary key or unique field.

Can someone help me figure out the best way to do this append/update queries to prevent duplicates. Also if you have a strategy for setting up some sort of unique or primary key for fields that could all be the same yet in the table only 1 record will show, no duplicates.

View 1 Replies View Related

Form Background Color To Signify Record Status

Jul 20, 2006

I have a form that contains a toggle button. When a record is complete and considered closed I click the toggle button. I want to make the form background turn red if I enter into a record that has been closed. :confused:

If this is not possible, is there something similiar that would stand out:rolleyes:

Can someone tell me how to do this? Thanks!

View 8 Replies View Related

General :: Record Source TblName Specified On Form Or Report Does Not Exist

Aug 21, 2012

I have an application written in Access 2007 and packaged using the Packaging Solutions for deployment with Runtime.My problem is that I've written an updated version, and after carefully saving my original Back End away from the install site, uninstalling Runtime and the FE, installing the new FE with a blank copy of the BE having the same name and Runtime, and copying the filled BE into the same folder with the FE (replacing the linked, but empty, BE) I find that SOME of my tables in the BE are not being recognized. This isn't true of all tables. I can open some of the forms and find everything there. In other cases I get the following error message "The record source "tblName" specified on this form or report does not exist."

View 2 Replies View Related

Modules & VBA :: Runtime Error 2580 - Record Source Does Not Exist

Jun 9, 2015

I currently have this set as the forms default recordsource (which works just fine):

Code:
SELECT TOP 5 tblUsers_Phone_Book.EMAIL_ADDRESS, weightedDL('me@mine.com',[EMAIL_ADDRESS]) AS Expr1

And I have this vba to dynamically switch around that email address.

Code:
Private Sub Form_Load()
Dim intPos As Integer
Dim strControlName As String
Dim strValue As String
Dim sSQL As String
If Len(Me.OpenArgs) > 0 Then
' Position of the pipe

[Code] ....

If I msgbox the sSQL - it shows identical to the default recordsource but I get the error:

The error message I get is:

Run-Time error '2580'
The record source 'SELECT TOP 5 tblUsers_Phone_Book.EMAIL_ADDRESS, weightedDL('me@mine.com',[EMAIL_ADDRESS]) AS Expr1' specified on this form or report does not exist.

I tried copying the exact working default sql into the vba and get the same result.

View 3 Replies View Related

Record Lock

Dec 1, 2005

I have a created a database for insurance policies.
I'm using a form in the database to edit the data in the underlying table.
I use "pessimistic lock" in the database and in the form.
The database runs in a multi-user environment.

My question is the folowing:

When a user is editing a record, it is obvious that this record is set to
lock in the table (--> pessimistic lock), but the 4 records that are right before this record
are also locked too!

There is nobody else editing at that same moment in the database and it is
not a one-time occurence!

Can somebody help me out with this one... I'm realy desperite and I
searched the entire forum.

View 2 Replies View Related

Lock Down Record

Feb 2, 2005

Hi all. I have a form that when I click a button is automatically changes a field on another form and then closes both forms. Can I add anything to this button to stop that record from being altered again. IE. when i click on this close job button nobody can ever change the record again. Thanks.

View 1 Replies View Related

Cant Lock Record HELP!

Jun 15, 2006

Hi All, I've searched the forum and have found a lot of info on locking records/forms. I pulled this from a thread but it doesnt work. I have a subform with many fields with a check box. if the check box is true then I want to lock that record(or the form). I loaded this in the on current event and I can still edit the form and or record.


if me.closed = - 1 then

Me.AllowEdits = No
Me.AllowDeletions = No
else

Me.AllowEdits = yes
Me.AllowDeletions = yes


thanks

View 3 Replies View Related

Conditionally Lock Record

Apr 11, 2005

OS/Program :xp/Access 2002

The following problem. Within my main form I have a status field. Dependent of the status of the main field I would like to lock the total record in my sub form at once. Within which event of the sub form could I achieve this and which property locks a total record?

thanks
giovi

View 2 Replies View Related

Lock Edit Record

Dec 31, 2005

Hi,

I'm new user here and I use Microsoft Access 2003 for my applications.

I use an mdb on a server (datas) and form on station over the network (application).

I would like to lock the record edit by user when this user press "modify" button and unlock the record when this user press "save" button to avoid with the other users modifying the recording.

Is it possible and how ?

Thanks for your answer.

View 1 Replies View Related

Lock A Record Through Application

Dec 13, 2006

Hi

I am a little bit confused with locking subject

I have a table in ms access database. it has some fields.

I access to this table through the application

but I want to fetch the information of a record and then lock this record. close the connection and then work on this information
after finishing works I want to update the record and then release the record.

the locks that I read are a little confusing

would you please help me and recommend a solution for this problem

thanks for attention
best regard

View 1 Replies View Related

Record Lock When Appending?

Jul 6, 2015

It should be noted that this is a shared database with the BE on a network. I have a process that allows users to create an Agenda for a meeting. In order to make the process more efficient the user selects a drop down box which then prefills attendees for that meeting. All very simple really, until more than one user attempts to run the process.

The issue is that this process runs a couple of queries. One to filter the attendees and then another to combine this information with the agenda information which is then finally appended to the MASTER Data tbl.

Is there a way that I can stop users using this at the same time by either giving an alert to the new users saying please wait and defer the process until the current process has completed and then the new request starts.

View 1 Replies View Related

Combox Filter Then Lock Record

Oct 10, 2005

Hi

I have a combo box to select a record on a form.

I would like then record to lock once it is selected via the combox box and the combo box to clear.

If a records is slected again from the combo box it will then show the new record and lock it again.

The problem is users are sometimes using the mouse button to scroll and moving to a different records by accident.

Thanks

View 6 Replies View Related

Freeze/lock One Record In Subform

Dec 14, 2004

hi! I asked this question before, and i didn't understand the answer.
I have a form with a subform. at first, i disable the subform until the main form is filled completely. Then, I have a button to enable the subform. This button also disables the main form.
My first line in the subform needs to mirror the info in the main form. To do this, i open a recordset, and then use .AddNew to fill in the details.
I don't want this first line to be edit-able or delete-able once it has been filled. How do I lock it from being edited? Also, if I later decide to delete everything on the form, will i be able to clear the whole form if this line in the subform is locked?
Please helpp

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved