Ok then I guess what I need to do is open a new form for data entry but then I will need to refresh frmMain somehow to reflect the new entry in the underlying able which means when frmMain gets refreshed, SubA should get refreshed and show the newly entered ID through the underlying query.
Ok MajP you were right, that click event now works and it pops up the form in modal format. But I still cannot type in an ID in my textbox through data entry. In frmMain the subform SubA is pulling the ID if it exists for the record from the query which has certain criteria in it. If an Id does...
If subform SubA is already open within frmmain, then is it a problem if I am trying to use this code in a button on frmMain to open the form again ?
Private Sub New_Record_Click()
If Form_ER_DonrContact.RecordsetClone.RecordCount = 0 Then
'.Form.RecordsetClone.RecordCount = 0 Then...
MajP : If I use "Form_ER_DonrContact" instead it says error 2102 the form name does not exist or is mispelled. But I checked and the form name is correct.
MajP : This code give me the error runtime error 2498 - an expression you entered has the wrong data type. It breaks on the line with the Docmd.openform
Private Sub New_Record_Click()
If Form_ER_DonrContact.RecordsetClone.RecordCount = 0 Then
'.Form.RecordsetClone.RecordCount = 0 Then...
MajP :
In the code window, if I type Me.subform name, should it does not show me the subform name in the list of objects on the form. Is there something is wrong there. When I type Me. it should show me the subform name in the list.
Al
PHV: If I turn on allow additions, when the form opens now, SubA is not greyed out anymore. But since the first record I am looking at, has no ID returned from the query, even though it is not greyed out, it wont allow data entry. What I need is that if the query returns with no ID then subform...
Hello,
I have a form (frmMain) with two sub forms (SubA and subB). When frmMain loads the textboxes within SubA are populated from a query that returns values from a local table based on whether a certain ID exists in the table. My problem is that if the ID does not exist the query returns no...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.