Need Help on Records getting changed abruptly (1 Viewer)

Shallo9

Registered User.
Local time
Today, 06:50
Joined
Nov 11, 2011
Messages
95
Hello All

I have a table called Activity with columns ActivityID, PolicyID (Lookup from tblPolicy), CustomerID (Lookup from tblCustomer) and further ...

I have an activity form with details from tblactivity..further I got a Dashboard where all the records are displayed including ActivityID (Hyperlink)

when ever the user clicks this activityID the activity form opens..This is fine but when the activity form is opened its changing the policyID and CustomerID on the form and in the table aswel. To make it even worst it some times changes and some times doesn't. Basically I am unable to find the problem at the first place. :mad:

I am using the below formula to open the activity form with three conditions..


Code:
DoCmd.OpenForm "frmActivity", acNormal, , "[customerid] = " & Me.CustomerID & "AND [ActivityID] = " & Me.ActivityID & "AND [PolicyID] = " & Me.PolicyID

Any Help would be grately appreciated...Its my third day on this issue...

Many Thanks

Basically My database has a the following structure

Each Customer has many policies and each policy can have many activities

CustomerID --->PolicyID--->ActivityID

If any one can shed some light on this that would be great.

Many Thanks
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 14:50
Joined
Jan 22, 2010
Messages
26,374
That piece of code is unrelated to your problem. You most likely have code elsewhere that's causing the change.
 

Shallo9

Registered User.
Local time
Today, 06:50
Joined
Nov 11, 2011
Messages
95
Thank you every one who looked into this problem. As mentioned by vbaInet, There was a bug in my code.

Just thought may be this would help others if they face a similar problem.

I was using Tempvars through out my code and at times these Tempvars were stored with Previous values depending on the users actions...Which is a genuine Semantic error. So I've used agrs whilst calling a form and passing the actual value as parameter instead of storing them to Tempvars.

Thank you ever so much everyone
 
Last edited:

Users who are viewing this thread

Top Bottom