Cigar Asylum Cigar Forum  

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-10-2011, 11:07 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 Anyone here a Microsoft Access pro? [Plea for help]

For the last few weeks I've been building up a database that will be turned into a SQL server in the future (and I'm learning as I go - I haven't used access for anything more than as an excel table that multiple people can alter at the same time). This is for management of data entry, reporting, etc. All the things you'd expect a database to do

I was reviewing the first form (Creating a new user) that I created within this database and realized that I created it before we agreed to follow Leszynski's naming convention. I renamed the fields and changed the VBA coding to reflect this. After breaking everything (Hurray!) and fixing most of it, I have hit one point that I haven't been able to correct. The code is shown below:

Quote:
Private Sub tglNextRecord_Click()

'Verify Production causing entity
If [chkProduction] = Yes Then
DLookup("[Production]", "tblUserPCE", "[UserID] ='" & [TempVars]![tvCurrentUser] & "'") = Yes
Else: MsgBox "..."
End If
'Verify Handling causing entity
If [chkHandling] = Yes Then
DLookup("[Handling]", "tblUserPCE", "[UserID] ='" & [TempVars]![tvCurrentUser] & "'") = Yes
Else: MsgBox "..."
End If
The error I get is Error 424 - Object required. It flags the DLOOKUP("[Handling]",...) line. This line should not be operating as I have chkProduction with a check and chkHandling without. Since [chkHandling] = No it shouldn't even attempt to run..right? This worked prior to renaming the fields, however I have double, triple, quadruple, quintuple checked to ensure that the field name matches the VBA code.

The TempVars pulls the UserID of whomever logged into the database in the first place. It functioned in the chkProduction If statement so I do not believe that is the issue.

Any ideas? I'll be back from lunch in 45 minutes if you all wouldn't mind having this solved by then
Posted via Mobile Device
Apoco is offline   Reply With Quote
 

Thread Tools
Display Modes

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 11:16 AM.


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