Combo Box -- Not In List Code Works but takes me to knew record

LittleGlory

Registered User.
Local time
Today, 22:29
Joined
Jul 25, 2001
Messages
12
I need some help. I have the code for my Combo Box working for NotInList (actually code posted in another post). However, after the new info is added to the combo box it automatically takes me to a new record on the form. I don't know why this is happening and I need to be able to have it stay on the same record. Any suggestions?
 
Please read tread starter

Ok, well for starters, you should have posted this additional post onto your last thread, it would have came to the top so we could have looked at the code you used and knew the problem... Hopefully he/she who gave you the code will read this because I am sure most of us don't have time to search for previous threads by user name......

Regards,
 
I somewhat agree with BLeslie88 about your posting. However; I must say this; loosen up a little bit on the users BLeslie88. Everyone is new to this board at some time or another.

LittleGlory:

Take a look at this previous post…it may lend you in the right direction...

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=31879

Don
 
Sorry

Sorry! I am new to the board. I wouldn't expect anyone to search through the posts. Totally my fault. Next time I will know better.
 
Hey..

I was just giving advice so he/she would get help faster... I am sincerely sorry for not putting it across smoother. It is not anyone's fault..... It's advise. I am new too.. I love this place and I think we should be advised on how to keep things simple and have better communication to avoid confusion and save time... Alas I am even more confused how this was posted under a dif name after referring back to the other post.... Whoa... lol

I love you all.... :)

Regards,
 
No problem. I looked and I can't find the original post. The code I am using is below.

Dim rec As Recordset

If MsgBox("Value is not in list. Add it?", vbOKCancel) = vbOK Then
Set rec = CurrentDb.OpenRecordset("tblFeatures")
rec.AddNew
rec!Feature = NewData
rec.UPDATE
Set rec = Nothing
Response = acDataErrAdded
Else
Response = acDataErrContinue
[Forms]![frmNewMRB]![Feature].Undo
End If

Any ideas why I am taken to a new record anyone?
 
Sorry to bother everyone. My problem was something so stupid I can't believe I'm telling anyone. The tabindex on my combo was the highest one on the form and I was hitting tab to get out of the box. Since I was running code to prompt the user on whether or not to add an item to the list I got totally thrown off. Chalk this one up to a bad, bad day! Sorry to waste your time.
 

Users who are viewing this thread

Back
Top Bottom