Can anyone tell me how to set a form up so that it will sort automatically on opening?
It is a simple form, based on a table with just a date field and a text field, and I would like it to sort on the date field. I have set the Order By property on the form, but that obviously doesn't apply...
I can't get PHV (10July) or SeeThru (15 July) answers to work unfortunately - again down to my lack of VBA knowledge I guess.
Does anyone have any other ideas, or are you able to expand on them?
Caroline
Just a thought - will this solve our problem of record locks??!! Or is that down to 2 users trying to add a record at the same time?
I got so engrossed in getting the code right that I forgot the main reason for my initial question!
Caroline
In answer to JBinQLD's question, it just shows the candidate name you are trying to enter, with an ok button below.
PHV - works a treat! Was that just with the addition of the Else argument?
Thanks to everyone for your help, as ever,
Caroline
Well, JBinQLD's suggestion - that gets the same error message as before.
PHV's suggestion - nothing happens, no error message on the code, but no message saying it's a duplicate name either.
Caroline
Private Sub ca_Name_BeforeUpdate(Cancel As Integer)
MsgBox (Me![ca_name])
If Nz(DLookup("[ca_name]", "[CANDIDATES]", "[CA_NAME] = '" & [me]![ca_name] & "'"), "") = "" Then
'no records matched this record so proceed
Else
'a match was found - please enter a number after the candidate...
Hi Aceman
Have I copied your syntax correctly?
DLookUp("[ca_name]","[CANDIDATES]","[CA_NAME] = '" & [Me]![CA_NAME] & "'") Is Not Null
It keeps putting square brackets around [Me], and doesn't then recognise it.
Yours (in need of training!),
Caroline
Thanks for your suggestion.
My database defualts to record level locking at the moment, but I still believe the problem is when people are adding new records at the same time - in the data entry form, the new record is not acknowledged in the underlying table until you come out of that record...
I have a data entry form where users add new Candidates and their information. The candidate name (ca_name) is the primary key in the underlying table (CANDIDATES), with no duplicates allowed, but duplications will not be checked for until they save the form. However I need it to check if it is...
I already have a form/subform that works like that (Candidate Info), and is fine, displaying data from the Candidates and Skills tables.
This is a seperate query, based on the same tables, but showing a summarised list (continuous form) of suitable candidates and their skills. They can then go...
Unfortunately it doesn't work. A new CANDIDATE INFORMATION form appears briefly (although not linked to the selected candidate, just goes to the first in the list) but then closes straight away.
Caroline
Sorry, I wasn't very clear!
I need the "go to" button to open a NEW copy of the Candidate Information form (therefore leaving any previously opened versions still open). It doesn't currently.
Hope this is a bit clearer,
Caroline
Thanks for your reply... I think.
Felt more like I was being told off.
(I do actually have 3 tables, and I thought each had a one-to-many relationship, however I'm probably wrong)
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.