You must convert it to access 2000 format
instead of just renaming your file's extension to mdb.
See the difference! (Not a true format for access 2000)
You must convert it to access 2000 format
instead of just renaming your file's extension to mdb.
See the difference! (Not a true format for access 2000)
Last edited by thhui; 06-27-2009 at 12:12 AM.
it seems that i gave you the wrong one...sorry about that.
I see a control named "Text99" bound to the [Post Number] field, but it is a TextBox and not a ComboBox.
here the one i converted to 2000
The name of your field is Post Number, not PostNumber.
Your code is fine, just change the name of the field that you are referencing.
BTW, using IM shorthand is frowned on in these type of forums. Take the time to spell out the words.
Just for the record, if you get the field name wrong but the table name correct in the DCount() function then total number of records in the table is returned, which is why it was always taking that branch in your code. It is just like: DCount([*],"YourTable")
thanks my friend its working now..i have 2 more fields like this to fix.
and sorry for my IM words.
now i get back to work if i get any more problems i come on this post again or create a new one?
again thanks my friends.
keep up the good work.![]()
Start a new thread with your next issue. Is this thread ready for the Solved thread tool?
OK...sure! Take your time.
i am back again..this time the problem is with the NIN number...i did make sure i change it..it runs but it doesn't return to the record..it gives me a
Run-time error '3070':
The Microsoft Office Access database does not recognize 'N_I_N' as a valid field name or expression.
the code will work if that field is set to TEXT?
my field NIN have spaces between N I N
thanks.
Code:Private Sub N_I_N_AfterUpdate() Dim SID As String Dim stLinkCriteria As String Dim rsc As DAO.Recordset Set rsc = Me.RecordsetClone SID = Me.N_I_N stLinkCriteria = "[N_I_N]=" & SID 'Check Employee Table table for duplicate If DCount("N_I_N", "Employee Table", stLinkCriteria) > 0 Then 'Undo duplicate entry Me.Undo 'Message box warning of duplication MsgBox " Warning N_I_N " _ & SID & " has already been entered." _ & vbCr & vbCr & "You will now been taken to the record.", _ vbInformation, "Duplicate Information" 'Go to record of original record rsc.FindFirst stLinkCriteria Me.Bookmark = rsc.Bookmark End If Set rsc = Nothing End Sub