Kamis, 04 Juni 2020

Re: [MSAccessProfessionals] Updating a list box after new record entry

Crystal,
I have tried your solutions but I could not get them to work.  Please view the attached image of my form and see if I have done it correctly.  Oddly, I have sent this message 2 times before but it has not appeared in the Messages list.

 "How can I save the record without closing that form?"

manually, you can click on the record selector box (where the pencil is, indicating there are unsaved changes. If it doesn't show or you want the keyboard shortcut, it is Ctrl-S

To automatically save a record when a particular value is changed, on that control AfterUpdate:

Me.Dirty = False

this is a somewhat obscure way to save a record because it isn't very intuitive, but good to memorize ;)

no need to test if the record is dirty first because the code runs on the AfterUpdate event of a control, so it obviously changed ;)

However, that won't requery a combo box. To do that, you can put this code on the Form AfterUpdate event:

Me.combo_controlname.requery

WHERE

combo_controlname is the NAME property of the combo box (or listbox)

kind regards,
crystal

_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#115549) | Reply To Group | Reply To Sender | Mute This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]

_._,_._,_

Tidak ada komentar:

Posting Komentar