Full Version: Can someone tell me whats wrong with this code
UtterAccess Forums > Microsoft® Access > Access Forms
lejeunerj
If I type in either 1576 or 1310 in the Start Code field then I want it to run the DoCmd's if I type in any other thing i want it to bring up the message box. I tried this but it doesn't work can someone help.
If Me.START_CODE = "1576" Or "1310" Then
DoCmd.Close
DoCmd.OpenQuery "creditqry"
DoCmd.OpenForm "Main"
Else
MsgBox ("Sorry You have the Wrong Pass Code")
thanks
lejeunerj
dannyseager
It looks ok (apart fom not having an end if but i assume that's just a typo here)
Are you getting any errors? what's it actually doing?
Jack Cowley
If Me.[START_CODE] = "1576" Or Me.[START_CODE] = "1310" Then
I have assumed the 1576 and 1310 are text and NOT numbers. If they are numbers then remove the quotation marks.
hth,
Jack
dannyseager
Sorry.. I missed it...
ry
If Me.START_CODE = "1576" Or Me.START_CODE = "1310" Then
dannyseager
beaten by Jack once again :( frown.gif
Jack Cowley
Hiya Danny!
You are up mighty late, but you seldom sleep anyway.. Sorry to jump on your toes but I figured you were asleep by now... How wrong I was...
Jack
Jack Cowley
Danny -
So, you actually beat me by a minute, but your solutiion was wrong so you owe me a trip to the pub when I come to visit.... Actually you are safe.. . I have been going to return to the UK for over 50 years and I haven't made it yet...
Jack
dannyseager
Jack... I just checked... you're banned from the UK for another 10 years for failing to make it in the past 50 years... frown.gif sorry.
It's only just past midnight here... and there are some good films just starting on TV
Jack Cowley
Danny -
RAT! So my OBE and my Knighthood mean nothing now... I never did trust Victoria...
LOL! Movies on TV after midnight... Only in the UK. Here it is nothing but people selling [censored], Hoovers that can lift a Mini Cooper off the ground and a vegetable chopper that can make 200 pounds of chopped celery in 30 seconds...
Jack
dannyseager
I would love a hoover that could lift a mini of the ground... I can't stand the new mini's frown.gif
And you never know when you're gonna need 200 pounds of chopped celery... just last week I... frown.gif
Otel you what Jack... I'll have a word with 'Beth and see if we can't get ban lifted... anything to buy you a drink frown.gif
Jack Cowley
Danny -
ever let it be said that your wit is not sharp! I am sitting here, like the old fool that I am, laughing out loud and hoping the neighbors are too senile to realize that it is me and think it is their other neighbor... Our houses are detached here otherwise the Old Fools Police would be coming round for a quick check on the git at 55 Goya Close...
Boy, did I need that laugh! You have made the rest of my day!! Now go watch "Wuthering Heights" with Sir Larry as Heathcliff and think about what you want to say to Betty when she calls asking about what to say to Prince Charlie on their next meeting...
Jack
dannyseager
Betty's on e-mail these days...
Bet@Queen.com (dont tell anyone though - she gave it to me on the hush hush)
I never knew they had old fools police in the bay area... man you people have got EVERYTHING!!! frown.gif
Jack Cowley
Danny -
MAO!! We have lots of stuff here in The Bay Area (including the Old Fools Police) but we don't have staggering taxes OR (DRAT!) pubs.... Ahhh, for a decent publican, a dart board and a room tempertature pint... Big sigh... o!
Jack
dannyseager
Yeah I've heard there's a big demand in the US for english pubs... my friend is trying to talk me into helping him open one... frown.gif
If we did it would have to be a cyber pub... with UA on tap frown.gif
Jack Cowley
LOL! Even at this late hour your brain is still working at top speed and mine says, "Is the sun past the yardarm?" The answer is "Yes" so that means you are going to have to stay up all by yourself as I am heading for the wine cellar and an end, unfortunately, to the fun I am having chatting with you... All good things must come to an end, sometime, as a chilled Australian Chardonnay is calling my name....
leep well and thanks for another inimitatable round of fun!
Jack
dannyseager
enjoy your wine Jack...
int it funny how we seem to hijack these posts with our late night conversations frown.gif
Jack Cowley
Danny -
I have pulled the cork... Not a half bad Chardonny... And yes, we do 'highjack' these posts, but somehow I need to try and keep my post count ahead of yours...
Stay well and I look forward to our next 'after hours' chat...
Jack
r_cubed
>
... and that would BE a ......?????
dannyseager
Rob... it's a type of wine frown.gif LOL
ack... I'm only 12,000 behind you.... frown.gif just a drop in the ocean frown.gif
balaji
Come on guys, keep it down now. Others are trying to get a little shut-eye!!
laugh.gif frown.gif sleeping.gif
Jack Cowley
Rob -
The chilled Australian Chadonnay would be Lindeman's Bin 65, 2004. Not a bad Chardonnay for USD $4.98. Australian whites tend to be a bit drier than Calfornia's so I have been trying some different ones. I have not always had great luck with Lindeman's but I tend to be cheap so have not tried their better wines. For USD $4.98 this is a very tolerable Chardonnay... I have heard from friends in Australia who know the Yellow Tail folks that their wines are pretty good, but I disagree. The Yellow Tail Chardonnay is not one that I will buy...
There you go. Probably more information than you wanted, but there it is... If you have a recommendation for an Australian or New Zealand Chardonnay or Sauvignon Blanc I would love to hear it!!!
Jack
PS. Hard to find more than a couple of New Zealand wines here....
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.