How to Make a Client_ID?

  • Thread starter Thread starter Legion
  • Start date Start date
L

Legion

Guest
Because I don't want my contractors to work out the number of people placed into accommodation each month (and also maintain my automated tracking system!) I need to insert a Client_ID with all the reports I email out each month. As my Primary key is incremental I cant use it, so I've been forced to create my own Client_ID.......which doesn't work.

This is attached to a BeforeUpdate Event and is supposed to populate my underlining table with the new Client_ID.


Private Sub RandomNo_BeforeUpdate(Cancel As Integer)

[Client_ID] = Left(Trim(Me![FamilyName]), 3) & "-" & Format_(Date, "yy") & "/" & Trim(Str(Me!LASC_Ref))

End Sub

Bonito.

Legion.
Why does the Cheshire Cat grin?.
 
Legion,

I don't think that your code is executing.
You could put in a MsgBox or set a breakpoint
to check.


A better approach might be to make an update
query with the same logic.

Then move your code to the BeforeInsert event
on your form where you add new clients.

hth,
Wayne
 
Sometimes it gets real hard just having to answer your own bloody questions all the bloody time. This site is such a great resource for me, allowing me to benefit from the collective knowledge of some truely ace programmers and cool technical users that nudge you in the right direction. I guess what I'm really trying to say is.................................................give me sex......give me drugs..................and you can F@*K the Rock 'N Roll.


Legion.
"The Rave Generator":)
 
Rich,
According to your Birthday on your Profile you are 10 years old.

If so shut up

then go to bed (with out supper)

else
Go F@*K yourself.

End Sub

Legion
"Is that acceptable"
 
Legion

How dare you talk to Rich like that. Rich is one of the most respected people on this forum infact come to think of it everyone here looks out for everyone else because that is what this forum is all about "being there for each other when in need" but I doubt if you would know the meaning of that when clearly all you have come here to do is cause a stir.

I respect this forum too much to tell you what I really think of you but clearly you do not so why don't you p*ss off back to where you came from.
 
Legion

I have kept out of your stupid posts because I didn't think they were worth responding to, but I agree with Hayley.

Its disgusting of you to speak to Rich like this and your post is totally uncalled for. As for your other post in the watercooler - we are all created equal - except you - you obviously have only half a brain.

I suggest you frequent a website more suited to your behaviour. I suspect you will be barred from this one anyway.

May I suggest to the members that all Legions posts just be ignored and they will "drop off" in due course.

Col
 
Well said, Hayley, and I hope that others will look at your postings and choose not to waste any of their time helping you.
In the words of Green Day, "kiss yourself goodbye".
 
You Guys are so sensentive.....please do ban me...I'm sorry....really. I love this forum its both helpful and entertaining. I'll promise to stop and behave.....give love a chance..



Legion
"For we are Sorry".
 
Legion has now been removed. No swearing on these boards please.
 

Users who are viewing this thread

Back
Top Bottom