We help IT Professionals succeed at work.
Get Started

Subform - requery

sonmic
sonmic asked
on
452 Views
Last Modified: 2012-05-11
Hi,

I have  a form with a subform. In the form i have 2 comboboxes. One for the article (called artikelnr) and one for the action that is needed (called meting).
When i select an article and then a meting the subform will not set up-to-date.
What i'am doing wrong?

Tx
On Error GoTo Err_Fout
    Dim rs As DAO.Recordset, db As Database
    Dim i As Integer
    Set db = CurrentDb()
    Set rs = OpenSeek("metingStandaardArtikel")
    With rs
        .Index = "Primarykey"
        .Seek "=", CLng(Forms!MetingItemsArtikel!Artikelnr), Forms!MetingItemsArtikel!Meting
        If .NoMatch Then
            .AddNew
            !Artikelnr = CLng(Forms!MetingItemsArtikel!Artikelnr)
            !Meting = Forms!MetingItemsArtikel!Meting
            .Update
        End If
    End With
    Me.Refresh
    Me.Requery
    Forms!MetingItemsArtikel.Form!MetingItemsArtikelSub.Requery

Open in new window

Comment
Watch Question
Retired IT Professional
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE