VBA code pulling the wrong values

  • Thread starter Access::Student
  • Start date
A

Access::Student

I've run into a very weird problem. I was having problems with a button on
one of my forms, and finally figured out the problem, and have confirmed it,
but have no idea why it's happening.

So I have this situation right now that I've devised to make sure I know
exactly what the problem is:
-the form I'm dealing with is a list based form
-in each detail I have three text boxes that have[kf_authorities_id] ,
[kf_programs_id] and [kf_submissions_id] in them (all number fields, no row
source/lookups)
- also in the detail is a button with the following code on the click event:

Private Sub Command56_Click()
MsgBox [kf_authorities_id]
MsgBox [kf_programs_id]
MsgBox [kf_submissions_id]
End Sub

When I click the button instead of getting the values I want I get the
values for "submissions", "authorities" , then "submissions" again. so only
"submissions" gives me the correct value. It's got me completely stumped.
I've dumbed it down as far as I can to make sure nothing else is wrong but I
can't figure it out...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top