I'm having issues refreshing a subform after a record is added in another form in access 2007-2010. It seems that could be very simple but I'm not sure where I'm failing.
I have three forms:
- One that is the main user form called main_user,
- another one where the user creates the purchasing requirements called tb_requirements
- and another one that is linked to the tb_requirements that is called tb_records.
The main idea of this system is that the user creates general purchasing requirements with attachments in tb_requirements and then adds some detailed requirements to the general requirement form (tb_records).
This function is already working but when I'm trying to update/go back to the main user screen (main_user) with all the open and new requirements, it does not work. The main user form is using a subform of the table tb_requirements. So in the VBA of main_user, I wrote the following code:
Private Sub Form_Load()
Dim sSQL as String
sSQL = 'with the query I want to show in the screen
Me.tb_requirements.Forms.RecordSource = sSQL
Me.tb_requirements.Forms.Requery
End sub
I also tried with .Refresh
and .Recalc
and it is not working. Could you please help?
Form_Activate
. – Gustav