dlookup vs link

branston

Registered User.
Local time
Today, 17:48
Joined
Apr 29, 2009
Messages
372
Hi!

I am drawing a blank and hopefully someone out there will have a wonderful idea of how to make this better...!

I have a form which is running from a query. In the query I mainly have information from Table a with a few bits linked in from Table b.

If I create the link with both tables in the query and then put all the fields in it works, but I can't update the fields.
I found a way around this, by only having table b in the query, and then doing dlookups for the information i need from table a. This means I can update the fields (which is the main reason I need the form) BUT it is painfully slow to load. I can see why, as I am asking for quite complicated dlookups and iifs... But I can't think of another way around it keeping it updatable.

Any ideas?

Thanks
 
If you want to be able to update the fields you need to implement subforms.
 
The form is continuous though... Am I right in thinking you can't have subforms in continuous forms? Any other ways around it?
 
In datasheets you can't but continuous forms you can. You can choose to put it in the Header or Footer section of the form.
 
Hum... I'm not too sure how this would help. Maybe I didn't explain very well - sorry!
Basically on the form I have 100 or so records. In each of the records there are some fields which aren't in the table a, so require lookups.

If I used a subform, I would need the subform to appear for each of those 100 records... so putting it in the header/footer wouldnt help, I don't think.

Thank you for the suggestion though!
 
What does a DLookup() function do? Gets the records from a domain based on certain criteria. The criteria part of a DLookup() isn't any different from the criteria row in a query or the WHERE clause of the SQL statement.

A form's record source can be based on a query that has it's records filtered based on criteria. A form is read-only if its record source is using complex joins or complex criteria. To overcome this you need a subform that will be linked to the main form.
 
Even in a continuous form it is quite possible to make the subform look entirely like it is part of the main form.

However I suspect your lookups should be in comboboxes rather than the recordsource query.
 
Right, thank you for all your suggestions - I shall have another play around and hopefully get something working!

Thanks again.
 

Users who are viewing this thread

Back
Top Bottom