Solved Load records of a bound form after selection of SiteID.

moi

Member
Local time
Today, 19:45
Joined
Jan 10, 2024
Messages
273
Hello all,

I have a situation that I was asked if possible to load records on form after selection on combobox of site id?.
 
Hello all,

I have a situation that I was asked if possible to load records on form after selection on combobox of site id?.
I have 4 location on tblProperty.. And i have siteid (fk) on tblbuyer.. My form takes records on tblbuyer, meaning it loads all sites (siteid) on opening of my form..
The user (secretary) wanted to load sites per session (edit/verification)..

How should i do that.. Pls i need help..
 
Do you mean not to display any records on a form until after the user selects an option on the combobox which filters the records in the forms record source?

Your form on load could have this set
Me.Filter = "(False)"
Me.FilterOn = True
then when you use the cbo ... after update .. you would need
Me.filter = yourcriteriastring
Me.FilterOn = True
 
  • Like
Reactions: moi
Do you mean not to display any records on a form until after the user selects an option on the combobox which filters the records in the forms record source?

Your form on load could have this set
Me.Filter = "(False)"
Me.FilterOn = True
then when you use the cbo ... after update .. you would need
Me.filter = yourcriteriastring
Me.FilterOn = True
Yes on opening of the form, it should have no records to display until the user selects which siteid to be loaded/dislay..

So i dont need to change the record source (tblbuyer) of my form?.
 
you can also use a query by form query, open form1.
an see the code on the combo's afterupdate event.
 

Attachments

  • Like
Reactions: moi
you can also use a query by form query, open form1.
an see the code on the combo's afterupdate event.
Thanks arnelgp... Your demo works easier for me to follow..
 
you can also use a query by form query, open form1.
an see the code on the combo's afterupdate
Hi arnelgp,

I think i did something wrong, if i select value to the combo, it stores the siteid value to tblbuyer
 
the combo should be Unbound.
 
  • Like
Reactions: moi

Users who are viewing this thread

Back
Top Bottom