Solved Combo box not selecting record? (1 Viewer)

Jolland26

New member
Local time
Today, 09:48
Joined
Sep 14, 2020
Messages
22
Hi guys,
I have a database that I have secured by using a login form and disabling the ribbons etc when my users are logged in. On one of my forms I have a combo box that simply selects the primary key ID field and updates some text boxes with the information that has been input for that ID. This works fine when I go into the database in the "developer" mode by holding the shift key, however, if I go in to the form using the normal way of logging into the database. the comboc box does not update these text boxes. Anyone know why this might be? I feel like there's some simple thing I'm missing but can't think what :ROFLMAO:

Thanks for any help suggested!
 

ypma

Registered User.
Local time
Today, 09:48
Joined
Apr 13, 2012
Messages
643
Hi guys,
I have a database that I have secured by using a login form and disabling the ribbons etc when my users are logged in. On one of my forms I have a combo box that simply selects the primary key ID field and updates some text boxes with the information that has been input for that ID. This works fine when I go into the database in the "developer" mode by holding the shift key, however, if I go in to the form using the normal way of logging into the database. the comboc box does not update these text boxes. Anyone know why this might be? I feel like there's some simple thing I'm missing but can't think what :ROFLMAO:

Thanks for any help suggested!
Hello Jollland26 as a user, I use the following in the after update event

Me!Combo729.Requery
Me!Combo729.Value = Null

Hope this of use to you
Ypma
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:48
Joined
May 7, 2009
Messages
19,230
maybe you need to add Code on the Combo's AfterUpdate Event (Code Builder):

private sub combo_afterupdate()
with me .recordsetclone
.findfirst "thePK_Field = " & me!combo
me.bookmark = .bookmark
end with
end sub
 

Jolland26

New member
Local time
Today, 09:48
Joined
Sep 14, 2020
Messages
22
Thanks for your help guys. arnelgp I have already got a mcro behind the combo box from when I added the combo, I've included the screenshot of that. I did try your method but still no dice. What confuses me is I have a similar form in the same database that has the record source of a different table, and when I use the combo box on that form it's fine? Doesn't seem to make sense to me.

I also tried your way ypma and the combo box didn't even have my values in the list, so I'm not sure if I have done it right?

My combo box has this as the Row Source as well (tblEQNSubAccpet being my table):
SELECT [tblEQNSubAccept].[EQNID] FROM tblEQNSubAccept;

Screenshot of the macro on the combo box AfterUpdate event:

Macro.png
 

Jolland26

New member
Local time
Today, 09:48
Joined
Sep 14, 2020
Messages
22
Not to worry!! I've sorted it after really racking my brains!
I am using a switchboard when the users access the database and the form was opening in add mode, not edit mode as I wanted.
I knew it would be something silly!

Thanks everyone for your help in the meantime.
 

Users who are viewing this thread

Top Bottom