Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why sub-form (continuous form) doing this?

Posted on 2014-12-07
3
Medium Priority
?
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 2000 total points
ID: 40485609
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
ID: 40485616
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
ID: 40485628
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

661 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