Update Form

F

Fredrik

Hello,

I have a form with subform.
The subform is showing orderinformation from a query.
In the query I have set Loadingdate >=frmOrder.txtbxFromDate.
This textbox is in the mainform.

This is working, the only problem is that i can not get it to update
properly when changed. I have go to designmode and back again to see the
order for the selected date.

I've tried to make a button from a guide and selecting "update form" when
pressed, but this does not work. What shall I do?

Best rgrds
Fredrik
 
K

Klatuu

Use the Link Master Field(s) and Link Child Field(s) properties of the
subform control on the main form.
In the Link Master Fields(s), put the name of the field from the main form's
record source you are wanting to filter on. In your case, that would be the
field bound to frmOrder.txtbxFromDate. In the Link ChildField(s) property,
put the name of the field in the subform's record source you are filtering
on. It appears that would be LoadingDate.

Now here is a gotcha. Neither of these dates should have time values in
them, or it is highly unlikely they will ever match. For example, if the
values are entered using Now() they value entered will include the system
time when the field was updated. Using Date(), will include no time value,
so it would show as 12:00:00 AM for time.
So when you compare two date fields, the times have to be exactly the same
for them to be equal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top