By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,948 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,948 IT Pros & Developers. It's quick & easy.

After update

P: 5
Hi

Can sum1 plz help i want to display student results on the studentSubform based on the selection i make in the combobox so far this is what ive got.
Query called students whereby the names of all the students are retrieved from the query into the combobox, the link master fields and child fields are linked with the student name abd behind the after update action i have got the following code:
Private Sub Combo6_AfterUpdate()


DoCmd.ShowAllRecords
Me!Studentsubform1.SetFocus

DoCmd.FindRecord Me!Combo6

Me.Combo6.Value = ""

End Sub

but everytime i click in the combobox to select the name of the student nothing happens but when i click enter the subform changes the results it displays but it doesnt go back to the previously selected students details i hope im making sense. Can sum1 help if they can and please tell me what im currently doing wrong.

Thanks
Apr 4 '10 #1
Share this Question
Share on Google+
5 Replies


Delerna
Expert 100+
P: 1,134
have you put breakpoints on the code in the Afterupdate event and then tried running the form to see if the code is actually being run?
Apr 6 '10 #2

P: 5
Howzit Delerna im actually just starting to use access and im not that really familar with it. So i dont really understand what are breakpoints. So how do i put in the breakpoints?
Apr 6 '10 #3

Delerna
Expert 100+
P: 1,134
On the code page (where you have your after update function)
Down the left side of that window you will see a border (probably grey)
If you click on that margin and next to a line of code, a red circle will appear.

That is a breakpoint.
When you run your form and cause that code to be executed then the program will stop at any line that has a breakpoint and display the code window with the current line of code that is being executed highlighted yellow.

You can hover your mouse over variables to see their contents and many other debugging tasks, including single stepping through you code so you can see how it is being executed.

I suggest you use access help document and search for "debugging" or "breakpoints"
Apr 6 '10 #4

Delerna
Expert 100+
P: 1,134
A picture is worth 1000 words

so here is one of a breakpoint

Where the red circle is, is where you need to click to set/unset the breakpoint

And the debug menu has options that relate to breakpoints and debugging code


Experiment.....it will be time well spent
Attached Images
File Type: jpg New Bitmap Image.jpg (21.7 KB, 113 views)
Apr 6 '10 #5

Delerna
Expert 100+
P: 1,134
If you set a breakpoint and run the form and then do something that you believe should cause the code to execute.

If you do that and the code window doesn't pop up with the breakpoint line highlighted yellow.
That means the line of code with the breakpoint is not getting executed at all ...... ever
Apr 6 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.