continouse form or subform with dynamic recourd source

masoud_sedighy

Registered User.
Local time
Yesterday, 19:43
Joined
Dec 10, 2011
Messages
132
i would like to know how i can have a continuous form or subform with dynamic record source.

before i was using a list box with dynamic row source and i had not problem.
now about the continuous form i have problem when i define record source of form on the fly how we have to add fields to the form.
some code or sample will be very helpful.

thanks.
 
Last edited:
My practice is to design a query then, based on this query ask to Access to create the form for me.
After the form is created, you can remove the query or, better, remove only the string from the form record source and keep the query. For any eventuality :)

Note please that to base the form on the "fly" SQL string is, in my opinion, the last thing that should be try. Only if nothing else don't work.
A better alternative is (I repeat: in my opinion) to base the form on a parametric query.
This can involve a little bit of cod in the Open event in order to catch the errors but is more flexible.

Good luck !
 
Thanks,
my problem is i have 3 different queries, I need to populate form or sub form by these queries. my actual problem is, when record source changes fields in the form also should change, how I have to design form that can be populate with these 3 different queries, I have to design 3 different forms? I have seen a sample (attached) that use 3 different queries for populating one sub form but i need the populating continuous form, because i want to add picture for each record, in my sample seems sub form is not continuous form, i am not sure, please help,​
 

Attachments

You can use multiple sources for one form if each of the sources return the same fields (exactly number and names).
Unfortunately... this is not your case. So you must design many forms.
 

Users who are viewing this thread

Back
Top Bottom