Hi All,
Yes, all the above codes work. The reason I was having trouble is: I am looking for the text box to only allow 8 or 11 character. in other words once the user reach 8 then the text box should not allow him to enter anymore. And the same goes for 11 characters.
Your code allows the...
thanks so much for your idea but it's sitll not working. This is what I put:
Private Sub Text53_BeforeUpdate(Cancel As Integer)
Dim Txt As Property
Set Txt = Me![Text53].Properties("Text")
If (Chr(KeyAscii) Like "[A-Za-z0-9]") Then
If Len(Txt) = IIf(Txt Like "#*", 8, 11) Then...
I realized that I put the code in Form_BeforeUpdate, I changed to:
Private Sub MemberID_BeforeUpdate(Cancel As Integer)
If Len(Me![MemberID]) <> IIf(Me![MemberID] Like "#*", 8, 11) Then
Cancel = True
Exit Sub
End If
End Sub
But still not working, not even giving me an error message.
This is what I put:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Len(Me![Member ID#]) <> IIf(Me![Member ID#] Like "#*", 8, 11) Then
Cancel = True
Exit Sub
End If
End Sub
Hi,
Can anyone help me Please
I need to make a text box allow the user to enter member id like this:
if the member id starts with a number then id lenght must equal 8. Example 16466851
If the id starts with a letter then id lenght must equal 11. Example JYW37125T01
Thanks in advance
Moulay
Beautiful. Excatly what I am looking for. I learned something new today thanks to you fneily.
ragnarok75,
The site you recommended is great, it looks like I'll be learning a lot using it.
Again thank you both.
Ismail
fneily,
thank you much for your help..
I am stuck..Please bear with me I am not an expert in vba.
1- I created the union query
2- created the form put the drop down box
3- placed the query on the ROWSOURCE of the combobox
all 3 steps are working perfect.
My question is:
Do I put your code...
Hi,
I need help creating the following: How to open a Report using a form (the Form contains 1 drop down boxes to choose from).
Form1 contains a button that opens another form (form2) with 1 drop down box. Form2 contains drop down box and a button to open the report. The drop down box...
Hi,
Can any tell me why I am getting the following error message:
The expression on open you enterted as the event property setting produced the following error: error accessing file. Network connection may have been lost.
*the expression may not result in the name of a macro, the name of a...
Maybe this:
You’ll need:
- the Acrobat PDFWriter software on your machine.
- Your own version of the Get/Save registry setting calls below
Note: this is a chopped down version of my real code just to show the salient points. You’ll need to adapt this to your own context.
I don't know what...
Hi,
I am not an expert in vba.Can anyone tell how to solve the following error.
I am trying to export an access report to pdf but i am getting this error:
Compile Error
sub or Function Not defined
This line is highlithed: GetRegistryString
Here the whole code:
Private Sub...
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.