Solved

Why sub-form (continuous form) doing this?

Posted on 2014-12-07
3
142 Views
Last Modified: 2014-12-07
For the life of me I can't figure out why a continuous form sub-form is doing this.  Here is a screen shot of it...

subform
And here is a screen shot of the actual data...

table data
And here is my afterupdate (and oncurrent code)...

Private Sub cboMedID_AfterUpdate()
    
    Me.txtMedGenericName = Me.cboMedID.Column(2)

End Sub

Open in new window


I've done this countless times before but am perplexed!
0
Comment
Question by:SteveL13
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
Comment Utility
Try setting the control source of txtMedGenericName to

=cboMedID.Column(2)

... and remove your after update and on current code that sets the value of txtMedGenericName.
0
 

Author Comment

by:SteveL13
Comment Utility
Perfect!  But I can't see why my way wasn't working.  It has in the past.  I must be missing something.
0
 
LVL 12

Expert Comment

by:pdebaets
Comment Utility
Well, if you are setting the value of an unbound control on a continuous form, then all of the continuous form fields in that column get the value. When you bind the control, then it looks to the record related to the continuous form row. That's how I see it. Maybe others will have a better explanation of what is going on.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now