hi,
in the code below, the line seems to be giving a2k a bit of a problem:
Private Sub MR_Number_BeforeUpdate(Cancel As Integer)
Me.RecordsetClone.FindFirst "MR_Number=" & Me!MR_Number
If Me.RecordsetClone.NoMatch Then
'do nothing
Else
Cancel = True
MsgBox "WARNING -- A record...
ah, so near, yet so far....
i cobbled together this code:
Private Sub MR_Number_BeforeUpdate(Cancel As Integer)
Me.RecordsetClone.FindFirst "MR_Number=" & Me!MR_Number
If Me.RecordsetClone.NoMatch Then
'do nothing
Else
Cancel = True
MsgBox "WARNING -- A record already exists with...
thanks evalesthy !
two quick questions, what does 'Cancel = True' do up there and i wonder if there's a way to replace the number that was in the "MR_Number" control for the one that was found to be duplicated elsewhere in the table? to recapitulate, once the msgbox is cleared, would it be...
is there some way the value of the CountOfMRNumber could be used in a macro condition to actuate the code i originally drafted which would generate a list of the last name, first name and mi of records having the duplicated mr number?
“The philosophy of the school room in one generation will be...
hi cghoga,
thanks for the input....what i think you're doing sql-wise is expressing a query that returns the MR_Number that has more than one record. What i think i needed was a listing of those when it is greater than 1 record and to ignore the query when it is just one record. the query would...
terrific phv!
this is what we look like now
Private Sub MR_Number_BeforeUpdate(Cancel As Integer)
Me.RecordsetClone.FindFirst "MR_Number=" & Me!MR_Number
If Me.RecordsetClone.NoMatch Then
'do nothing
Else
Cancel = True
MsgBox "WARNING -- A record already exists with this MR...
et voila, phv!
but tell me, how can i also prevent the act of closing the msgbox window from moving the record to another record (the next record in the table)?
“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
hi,
should this work?
Private Sub MR_Number_AfterUpdate()
Me.RecordsetClone.FindFirst "[MR_Number] = " & [Forms]!["ID Table"]![MR_Number]
If Me.RecordsetClone.NoMatch Then
'do nothing
Else
MsgBox ("WARNING -- A record already exists with this MR Number")
End If
End Sub
“The...
in my case, the field that we need to guard against duplicating is called MR_Number (for Medical Record Number) and is an integer valued field. would this work by using the same string?
“The philosophy of the school room in one generation will be the philosophy of government in the next."...
...[ID Table].Dummy
FROM [ID Table]
WHERE ((([ID Table].[MR Number]) In (SELECT [MR Number] FROM [ID Table] As Tmp GROUP BY [MR Number] HAVING Count(*)>1 )))
ORDER BY [ID Table].[MR Number];
IF THERE WERE SOME WAY THAT I COULD CONDITION THE MACRO TO TRIGGER THE DISPLAY OF THE QUERY WHEN THE SUM...
what i tried to explalin, perhaps imperfectly, is that i want to enhance a form by adding a command button which would have the net effect of emailing a group of usernames a message. the a2k application file (mdb) is on a shared network drive ("I") which all users to whom it would be sent have...
i'm interested in folding in an automatic email capability into my a2k app'n which runs on windows 2000 professional desktops equipped with 'groupwise' (not 'outlook'). the first solution of chickey's looks like it might work, but being the code doesn't mean all that much to me, it'd be great if...
c'est la vie i guess.
thanks, for sure for the heads up!
“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
i have a form that is 5" wide and that i want to be worked with at that size (not bigger or smaller); it is actuated from a 'switchboard' menu item. it has been paired with a 'tool bar' that has a subset of about 5 commands (called 'screening log'). in its 'menu bar' property the setting is '=1'...
i guess you're on a 4dy/wk sort of thing--it's still very much a thursday o'er here... have fun.
“The philosophy of the school room in one generation will be the philosophy of government in the next." --- Abraham Lincoln
howdy,
interspersing.....
Sorry, but I'm not sure that you can do what I'm suggesting in ms access with the set up you have. Using views to restrict access to user groups is something I've seen used lots before when the server database is Oracle, teradata, sql server, etc. and the client is...
Hey!
i'm going to reprise my interspersity technique
An Access (2k) database is on the server and is all singing, all dancing for those users that are supposed to use it and there is no problem with them seeing the confidential information. I'm assuming that there is a password (for LASsie?)...
i'll try to intersperse my comments and such between the lines
my heads spinning a bit - I think I may have been missing the point a bit actually as I though that your original database (with MR numbers and confidential stuff in it) was Access!
mia culpa, mia culpa....i must've given ya' the...
hi,
i figured a view = query in a2k. no problemo. i am aware of the sql view of graphical queries so ditto.
to your suggestion....are you proposing that i use the 'replication manager' or 'wizard' if that is what it's called to replicate the a2k database.
my security (LASsie) app is similar...
...from Peter's Software, http://www.peterssoftware.com) instead which is probably sufficient.
now about creating views in your FE and BE via
SELECT *
FROM VW_DATA_NO_MR
IN 'C:\PRIMARY_DATABASE.MDB';
would you mind clearing up what 'views' are in ms a2k and how my own app'n might deploy them...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.