troubleshooting Question

Subform - requery

Avatar of sonmic
sonmic asked on
Microsoft Access
9 Comments1 Solution455 ViewsLast Modified:
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

ASKER CERTIFIED SOLUTION
Hamed Nasr
Retired IT Professional

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros