There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Seemingly simple Visual Basic error in Access


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
sharonme's Avatar
Junior Member with 4 posts.
 
Join Date: Aug 2005
Location: Louisville, KY, USA
Experience: Advanced
18-Aug-2005, 10:39 AM #1
Unhappy Seemingly simple Visual Basic error in Access
(using Access 2002)

Hi. I'm trying to "beef up" one of the Access general templates for use, and I'm running into a problem.

I'm using the "Contacts Management" template, and have added a field "ReferredBy" to the Contacts table. I was wanting to add this as a search item on the "Report Date Range" form, so that I can have a report organized not only by date but grouped by ReferredBy.

I hope this makes sense, I am experienced with Access but not very experienced with Visual Basic. I've done a ton with MySQL, and thought this would be related. I guess I'm wrong... ;-)

I've been able to add the ReferredBy to the Report Date Range form. However, I get an error:

Run-time error '2465': Microsoft Access cannot find the field "|" referred to in your expression.

The VBA for the Report Date Range looks like this:

Private Sub Form_Open(Cancel As Integer)
Me.Caption = Me.OpenArgs
Me![Referred By] = [ReferredBy]
Me![Beginning Call Date] = Date - Weekday(Date, 2) + 1
Me![Ending Call Date] = Me![Beginning Call Date] + 6
End Sub


Everything works fine when I don't have the "Referredby" line in there, but it does nothing with that item... The way the code is now, it seems circular, but my brain can't figure out how to fix it.

If you would like to view the file, the location is sharonedmonds.com . Simply add the file name to the end of the url to download the db (same file, one is zipped): CustMgmt.mdb or CustMgmt.zip

Please help. I am so frustrated and just looking for a little help, even just where I need to go to get help.

Thank you!
sharonme's Avatar
Junior Member with 4 posts.
 
Join Date: Aug 2005
Location: Louisville, KY, USA
Experience: Advanced
18-Aug-2005, 11:19 AM #2
Ok, so now it looks like the problem isn't in the form, but in the report I'm trying to make.

I've updated the database to include dummy entries, so that you can see the lack of organization in the report.

1. Download http://www.sharonedmonds.com/CustMgmt.zip
2. Click "Preview Reports"
3. Click "Preview the Weekly Call Summary Report"
4. Select a loan officer and a date (at least 1 week).
5. The report pops up, organized by person, but it doesn't seem to process the "loan officer" item from the previous form.

How in the world do I change this??? I'm so confused...

Last edited by sharonme : 18-Aug-2005 12:14 PM.
MustBNuts's Avatar
Senior Member with 1,930 posts.
 
Join Date: Aug 2003
Location: Nevada
22-Aug-2005, 08:04 PM #3
By what you've written, you've added the field to the table, but you probably have not added the field to the query that the report is pulling.

In the report's design view, take a look at the report properties, it will tell you the source of the data (table or query)...I suspect it's being populated by a query.

Go to the query it references and add your field there too.

Hope this helps,

MBN
__________________
I'll burn that bridge when I get to it!
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:33 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.