Cigar Asylum Cigar Forum  

Go Back   Cigar Asylum Cigar Forum > Non Cigar Specialty Forums > Misc > General Discussion

Reply
 
Thread Tools Display Modes
Old 08-11-2011, 07:19 AM   #1
Apoco
Nerd with social skills
 
Apoco's Avatar
4
 
Join Date: May 2010
First Name: Alex
Location: Chattanooga, TN
Posts: 1,286
Trading: (37)
Apoco is a jewel in the roughApoco is a jewel in the roughApoco is a jewel in the rough
Default

Quote:
Originally Posted by elderboy02 View Post
Ha ha brother. You too have the VBA rage
I graduated with a double major in accounting and finance. I did this because I know I don't have the patience for programming

PS - I ran into another 424 error.

Quote:
Private Sub chkOther_AfterUpdate()

'Verify Other capability
If [chkOther] = Yes Then
DLookup("[Other]", "tblUserPCE", "UserID = '" & Forms![frmNewUser]![strCurrentUser] & "'") = Yes
Else: [chkOther] = ""
MsgBox "You may not create a user that can authorize Other issues"
End If

End Sub
If the DLookup returns "No" then there is no error. If the DLookup returns "Yes" then I receive a '424' error.
Posted via Mobile Device
Apoco is offline   Reply With Quote
Old 08-11-2011, 12:06 PM   #2
Noodles
Adjusting to the Life
 
Noodles's Avatar
 
Join Date: Oct 2008
Posts: 412
Trading: (2)
HUpmann
Noodles is on a distinguished road
Default Re: Anyone here a Microsoft Access pro? [Plea for help]

Quote:
Originally Posted by Apoco View Post
I graduated with a double major in accounting and finance. I did this because I know I don't have the patience for programming

PS - I ran into another 424 error.

If the DLookup returns "No" then there is no error. If the DLookup returns "Yes" then I receive a '424' error.
Posted via Mobile Device
First question, is Yes a global variable in your application?

What datatype is [Other]? Bit, string/text, integer?

Same question with [Hanlding] and [Production]? What datatype are they?

VB and all it's variant is not too clear between take this value and assign to this variable VS is this value equals to this value?

In your case,

Dlookup() = Yes

Access is trying to interpret the above statement and making a guess that you actually want to assign the result of DLookup to the variable Yes (this is a variable, correct? That's why it's telling you to make a switcherroo to Yes = Dlookup().

With regards application security, you should always have some sort of a security in your application, regardless of who will be using them.

If you need help, feel free to send me a message.
Noodles is offline   Reply With Quote
Old 08-11-2011, 02:28 PM   #3
Apoco
Nerd with social skills
 
Apoco's Avatar
4
 
Join Date: May 2010
First Name: Alex
Location: Chattanooga, TN
Posts: 1,286
Trading: (37)
Apoco is a jewel in the roughApoco is a jewel in the roughApoco is a jewel in the rough
Default

Quote:
Originally Posted by Noodles View Post
First question, is Yes a global variable in your application?

What datatype is [Other]? Bit, string/text, integer?

Same question with [Hanlding] and [Production]? What datatype are they?

VB and all it's variant is not too clear between take this value and assign to this variable VS is this value equals to this value?

In your case,

Dlookup() = Yes

Access is trying to interpret the above statement and making a guess that you actually want to assign the result of DLookup to the variable Yes (this is a variable, correct? That's why it's telling you to make a switcherroo to Yes = Dlookup().

With regards application security, you should always have some sort of a security in your application, regardless of who will be using them.

If you need help, feel free to send me a message.
Other, handling, etc. are all checkbox format (they are a Yes/No value).

Crap. What I was stating for the "then" really should have remained as part of the if statement. If (this box is checked) and (the dlookup shows authorization for the user to check that box) then (nothing? is there a way to say continue as usual?) else (error statement & exit sub). It was completely a formatting issue on my end. I've only been using access for about 2 weeks which is why it probably didn't pop out to me.

The security in place is an in-db login and user rights list. Once the user logs in they are tied to their account which is assigned user, superuser, admin, etc.
Posted via Mobile Device
Apoco is offline   Reply With Quote
Old 08-12-2011, 12:53 PM   #4
Noodles
Adjusting to the Life
 
Noodles's Avatar
 
Join Date: Oct 2008
Posts: 412
Trading: (2)
HUpmann
Noodles is on a distinguished road
Default Re: Anyone here a Microsoft Access pro? [Plea for help]

Quote:
Originally Posted by Apoco View Post
Other, handling, etc. are all checkbox format (they are a Yes/No value).

Crap. What I was stating for the "then" really should have remained as part of the if statement. If (this box is checked) and (the dlookup shows authorization for the user to check that box) then (nothing? is there a way to say continue as usual?) else (error statement & exit sub). It was completely a formatting issue on my end. I've only been using access for about 2 weeks which is why it probably didn't pop out to me.

The security in place is an in-db login and user rights list. Once the user logs in they are tied to their account which is assigned user, superuser, admin, etc.
Posted via Mobile Device
Should have been ...

If [chkOther] = Yes AND DLookup("[Other]", "tblUserPCE", "UserID = '" & Forms![frmNewUser]![strCurrentUser] & "'") = Yes then
... true statement here ...
Else
... false statement here ...
End If
Noodles is offline   Reply With Quote
Old 08-15-2011, 06:59 AM   #5
jcruse64
Adjusting to the Life
 
Join Date: Jan 2009
First Name: Joe
Location: Paducah, KY USA planet Earth
Posts: 313
Trading: (1)
jcruse64 is on a distinguished road
Default Re: Anyone here a Microsoft Access pro? [Plea for help]

Wish I could help, but haven't really done anything with DLookup in the stuff I built for our lab. I agree Access and VBA can be extremely frustrating at times, but it's still a nice little database program for some applications. Also nice that you can "upgrade" the data to something else like SQL Server when the need finally comes, and hang on to your front end stuff.

I found a pretty decent forum for help at:

http://www.access-programmers.co.uk/forums/index.php
jcruse64 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 12:42 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
All content is copyrighted jointly by Cigar Asylum and the content provider.