Need Help - Combo Box in Form Header

Larry G

New member
Local time
Today, 06:58
Joined
Feb 15, 2011
Messages
8
Hope/think this is the right forum group for my issue.

I/we are running several essential databases originally programmed in Access 2000 that run fine in windows XP. We recently changed all workstation/pcs to Windows 7 operating system and plan to instaull Access 2010 each machine. So I'm currently testing the A2K programs in Access 2010 on a pc with windows 7 .

Several forms have a combo box (originally created with the wizard)in the form header that find a record on the form. All work fine in XP. The code in the afterupdate event is:

Me.RecordsetClone.FindFirst "[MRNUM] = " & Me![Combo47]
'Me.Bookmark = Me.RecordsetClone.Bookmark

However they do not work in the Access 2010. Based on some searching I've done...it seems this issue is a known bug. I have spent a fair amount of time searching web for a fix. I found a few that seemed easy enough to try..including recreating the combo box with the Acess 2010 wizard and trying a macro I found in another forum... but so far none have worked.

Therefore, I respectfully request assistance/guideance.

Since I am a relative newbie to Access, if suggestion includes code please be kind enough to indicate the keystrokes (text) to create the desired result and where it should be placed.

Thanks in advance for any help.

Regards...Larry G
 
Try:
Code:
dim rst as DAO.Recordset

set rst = me.recordsetclone

rst.FindFirst "[MRNUM] = " & Me![Combo47]

if not rst.nomatch then
    Me.Bookmark = rst.Bookmark
end if
Welcome to the forum!
 
Many thanks for the suggestion.

I copied the your suggested code into the VBA pane for the afterupdate event and got the same error message I've been getting with the original code.

" Runtime Error: 2455
you entered an expression that has an invalid reference to the poperty |. "

Any other comments/suggestions?
 
Thanks again.

I did try replacing the code according to your last suggestion and got the following:
"Run-time Error 3021
No Current Record "

Sorry...but...while waiting to see if I would get more suggestions, I noticed that the form loads ok..but..is like stuck on one record...the navigation buttons don't move off the record...I created another query with the fields that drive the main form...in query pane all the records are there...in the combo box the records are there...but the navigation area only shows the 3141 of 3141 (there are a total of 3141 records in the table driving the main form).

So..now..I'm really lost...I even tried to copy all the controls to a new form and got the same result.

Really sorry..but..I hope you have some ideas or suggestions on how I might proceed.

Regards...lost...but hopeful...Larry G
 
Let's have a look at a stripped down version of your db. Also point out which form is the problem form.
 
WOW...I think I managed to find the issue..the field linked to the combo box...had a macro firing in the on-got-focus event that was suppose to move to the last record in the table..it worked but for whatever the reasons wouldn't move off it...I removed the macro and all seems fine. I'm using the last code you suggested in the combo box.

This dbase is loaded with lots of stuff and some code that does some wonderful things...that I know is broke in a few places...so...I'm sure I'll be posting again..when I get to those items.

In the meantime...THANKS...for all the help on this issue...I wish/hope someday I'll get the chance to return the favor, to you and others that provide this type well apprecaited help/assistance.

Regards...Larry G.
 

Users who are viewing this thread

Back
Top Bottom