Solved

DoCmd.OpenForm not giving expected results

Posted on 2011-09-04
2
368 Views
Last Modified: 2013-11-27
Great Day! I am trying to open a form with the following criteria

    stLinkCriteria = "[CustomerID]=" & Me![CustomerID] & " AND [CustomerVehicleID] = " & [Forms]!frmCustomerContactData!frmCustomerVehiclesSub.Form!VehicleMake

but no records show up and there should be 6. When I open the form with only the first criteria

stLinkCriteria = "[CustomerID]=" & Me![CustomerID]

all of the customer’s vehicles show, but I want to only open vehicles that = a specific vehicle make

I did try to open the form with the second criteria

stLinkCriteria = "[CustomerVehicleID] = " & [Forms]!frmCustomerContactData!frmCustomerVehiclesSub.Form!VehicleMake

but again, no records showed up. I placed a temporary field in the subform called ‘VehicleMake’ to see if the value that I expect shows up when the  subform (the one calling the form that I want to meet the specific criteria), and it does. Not sure where to go from here.

Thanks in advance for your help.

r/David

Thanks again for your assistance and any further help will be equally appreciated.

r/David

stLinkCriteria = "[CustomerID]=" & Me![CustomerID] & " AND [CustomerVehicleID] = " & [Forms]!frmCustomerContactData!frmCustomerVehiclesSub.Form!VehicleMake

Open in new window

0
Comment
Question by:yddadsjd95
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
hnasr earned 400 total points
ID: 36480166
Attach a simple database that demonstrates the issue.
0
 

Author Closing Comment

by:yddadsjd95
ID: 36480288
Thank you hnasr, while I was stripping the unnecessary objects from the database, I discovered that I needed to be looking at VehicleMakeID and not CustomerVehicleID. One of those rare occasions that someone pointed me in the right direction and I figured it out. Thanks .
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question