Check Code

  • Thread starter Thread starter 123
  • Start date Start date
1

123

Thank you very much
I put this code in textbox before update to check if the content in the text
box is entered before ((Duplicated)) or NO and work correct I want to use
this code with current event in Data sheet form and this data sheet form
properties can't (add, delete) and this form is sub form in master form.. ok
My code Is:
If (DCount("*", "tblname", "fieldname= screen.activeform.controlname") >
0) Then
msgbox "this number is enter"
End If

this code not work with sub data sheet form ....
If you could edit this code to use with current or Conditional format..
thank you
 
-----Original Message-----
Thank you very much
I put this code in textbox before update to check if the content in the text
box is entered before ((Duplicated)) or NO and work correct I want to use
this code with current event in Data sheet form and this data sheet form
properties can't (add, delete) and this form is sub form in master form.. ok
My code Is:
If (DCount("*", "tblname", "fieldname=
screen.activeform.controlname") >
0) Then
msgbox "this number is enter"
End If

this code not work with sub data sheet form ....
If you could edit this code to use with current or Conditional format..
thank you
if fieldname is text then use
If (DCount("*", "tblname", "fieldname='" &
me.activecontrol & "'") >0
if it is a number then use:
If (DCount("*", "tblname", "fieldname=" &
me.activecontrol ) >0
 
Thank you
I don't know why this code also not work if you could check it again because
the msg box display for every record..
thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top