dbTalk Databases Forums  

Visual Basic 6 / Access

comp.database.ms-access comp.database.ms-access


Discuss Visual Basic 6 / Access in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Oin Zea
 
Posts: n/a

Default Visual Basic 6 / Access - 03-24-2005 , 09:08 PM






Set dbsCC = OpenDatabase(Path & "\CC.mdb")
Set Clients = dbsCC.OpenRecordset("Clients")

At any time how can I tell how many records are in Clients?

I have read about .EOF and .BOF and .RecordCount but if 2 user are connected
to the database and one erase all records from clients then the other user
will not have a correct reading from these variables. That is why I ask how
can I tell how many records are in Clients at any time?



Reply With Quote
  #2  
Old   
Sean
 
Posts: n/a

Default Re: Visual Basic 6 / Access - 03-25-2005 , 10:34 AM







Oin Zea wrote:
Quote:
Set dbsCC = OpenDatabase(Path & "\CC.mdb")
Set Clients = dbsCC.OpenRecordset("Clients")

At any time how can I tell how many records are in Clients?

I have read about .EOF and .BOF and .RecordCount but if 2 user are
connected
to the database and one erase all records from clients then the other
user
will not have a correct reading from these variables. That is why I
ask how
can I tell how many records are in Clients at any time?
Ideally you would want to restrict access to users to do a "mass erase
of all records".

Example:
Customer table
If I have a user click Edit on a record, I have a field in the Customer
table that is a yes/no and I set it to yes if it is already equal to
no. If the field is already set to yes I display a polite message box
that says:

"This record is currently being edited."

Now, dynamically, you could also save a network logon and date to the
table and display the message like this:

"This record is currently being edited by BOB as of 03/16/2005."

Then, if the user is hard-pressed to add notes to the record, they can
call Bob and ask how long they are going to be in the record.

Otherwise, you fall back on the who saves last wins rule.

Does this help?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.