|
|
08-10-2011, 11:07 AM | #1 | |
Nerd with social skills
|
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:
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 |
|
08-10-2011, 11:51 AM | #3 | ||
Nerd with social skills
|
Quote:
Quote:
Posted via Mobile Device |
||
08-10-2011, 11:22 AM | #4 |
F*ck Cancer!
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
I would put
Msgbox "[UserID] ='" & [TempVars]![tvCurrentUser] & "'" right at the top of the routine just in case.
__________________
Need Beads? Need Five Finger Bags? 2 of 3 Requirements for use of the CA Rolodex: 100 posts/ 60 day membership/ participation in trade (trader rating). New members can be added at any time. |
08-10-2011, 01:31 PM | #6 |
F*ck Cancer!
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
This is one of the reasons I don't use access directly (anymore). Do all my coding in ADO on webpages and then I can use Acess or SQL Server databases and it all works...
Good luck!
__________________
Need Beads? Need Five Finger Bags? 2 of 3 Requirements for use of the CA Rolodex: 100 posts/ 60 day membership/ participation in trade (trader rating). New members can be added at any time. |
08-11-2011, 07:38 AM | #7 | ||
Nerd with social skills
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
OK. So I slept on it for the night and came in ready to try to fix this error. It stops giving me the "Object Required error if I rearrange the formula from this:
Quote:
Quote:
SO...what I have done instead is set up a separate, hidden set of checkboxes that will run as soon as the user opens the form. It will populate the checkboxes from tblUserPCE/tblUserDisposition into frmNewUser. I copy/pasted the exact DLookups that weren't functioning before...and now they work perfectly. This is a temporary, ugly fix. There is some issue with my syntax. I do not understand why it is not accepted Dlookup()=Yes and is instead forcing Yes=Dlookup(). I also do not understand why Yes=Dlookup() breaks the DLookup() In summary: Access sucks. Posted via Mobile Device |
||
08-11-2011, 07:41 AM | #8 | |
Lets Go Buckeyes!
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
Quote:
|
|
08-11-2011, 07:49 AM | #9 | ||
Nerd with social skills
|
Quote:
I just had a thought. Maybe instead of having it check all of them at once I should have them checking every time the user updates a given field...that might work...I'll be back in a few. Time for more testing. EDIT: OK. If I instead run a code that looks like this: Quote:
WHY DOES THIS WORK, BUT MY FIRST SOLUTION DOESN'T. *rage* Posted via Mobile Device |
||
08-11-2011, 08:19 AM | #11 | |
Nerd with social skills
|
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:
Posted via Mobile Device |
|
08-11-2011, 10:22 AM | #12 |
Nerd with social skills
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
This just in: I'm an idiot.
This form is for admins only. I had forgotten about that. They have access to do everything in the system...so there's no need to limit them. I never got the controls to work...but I never needed them in the first place. *sigh* Posted via Mobile Device |
08-11-2011, 10:42 AM | #13 |
Have My Own Room
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
Just a thought even though you no longer need it Alex, but a couple things to check on the variable - was it dim'd properly, also we run into issues a lot with something above setting a variable/location that it is looking for as something unintended so although you code may be right a run before it sends this string looking in the wrong direction.
My run-ins with VBA though stem from using Excel to interface with a simulation program. |
09-16-2011, 03:29 PM | #14 | |
Nerd with social skills
|
Re: Anyone here a Microsoft Access pro? [Plea for help]
Next question! (My previous question was resolved...and then destroyed as they changed their mind about what it should do)
What I'm working on now is creating a report filter via query. I know the reporting portion will be used even if the input section is bypassed in favor of direct interaction with SAP. I have an IIf statement that looks like this as the criteria portion of a query: Quote:
Is there a different way to have it return all fields? I assumed that having "Like "*"" would return all entries due to * being a wild card in MS Office. My google-fu has failed me on this one Posted via Mobile Device |
|