Relationships

Tezdread

Registered User.
Local time
Today, 22:28
Joined
Jul 11, 2002
Messages
105
Hi,

Not sure this is possible, and if it is I need a little help.

In my DB I have several tables -Customer Info, Contact Info, Account Info etc

I've been helped in getting a query to work that uses the IIF statement and has embeded IIF statements. This is all going well so far.

My table relationships seem to setup correctly and all working ok. What I'd now like to do is have a form with part of the query results but so it's linked in with my customer records.

Currently I have form with CustomerInfo, a sub form that I enter the offer critiera and then another sub form that pulls data from a query that is based on the offer criteria. When I use the navigation buttons on the main form, it scrolls through the records but the sub form based on the query doesn't move as well. I can move forward backwards and the records are correct.

So I guess the really question is, how can I get the sub form that's based on a query, be navigated at the same time as the rest of the records?

Could anyone let me know if this is possible?

Thanks
 
that seems to be working ok now however in order for the query to run I have to go forward a record and then back again. Once the data has been stored i.e. moving to the next record and then back again I can do the calculations on the fly.

I've added a save record button but again this only works to re-calculate not in the initial input.

Not sure I'm making myself clear so will post up DB soon...
 
not sure if i understood your question correctly, but i think that it's a requery issue. Try searching this forum for "requery".
 
yeah I thought I was getting lost with my explanation.

I'll attach a sample db so that you can see what I mean. I think the relationships are correct and I can see that I need to go to the next page in order for the query to run even though the record is saved.

I tried a macro to save record as well but that didn't work either, but that is what I'd like if it can't be automatically when entering the data...

n1
 

Attachments

Last edited:
still not getting this,, been trying a few things but can't quite grasp what's happening...

Although I haven't added it on the sample db I posted, there's another screen that the first team would use to enter the customer and account details.

The second team opens another form that would have all those records that require their input (and calculations). At this point I can see the new records so I know they're stored correctly but don't understand why I have to go forward a record and back again before the query will run...

I've tried running the query in the background from a macro but the only options I can see are: OpenQuery but this wont let me run it in the background without opening it in datasheet, design or print preview...

Can anyone offer any advice?
 
I've checked this but it all looks fine and the forms do scroll together but that's not the issue.

I want to be able to run the query to give me the results without having to go to a new record and then back again...Can this be done with the way my database it setup?
 
Pat, I don't know enough about VB to expand on what you've posted...If you want to see whats happening, the db I've posted will do that when you enter details into the form.

But if you don't want to download it:

○ I enter details into the form, these are then store in the table (usual process)
○ The bottom subform was created from a query
○ After I enter all the information the bottom subform does not show the results
○ I move forward to a new record and back to the record I just entered detail into
○ Now the calculation is showing
○ I can change the details in the main form and this will then update the query.

I need the sub form to do all the calculations without having to move to a new record.
 
I don't understand what mainform data you are trying to show in the subform


I've found it difficult to explain what's happening and by the looks of it, what I would like to happen...if you take a look at the database you will see.

I left the record selector on the main form and use the to make sure the record is saved before moving down to the query so I don't understand why, after the record has been saved the query doesn't work until after I've left the current record and returned to it?

I appreciate your help with this, I'm just failing to see what's happening in order to understand what I can do.

I'm assuming that if the button option works in this case, I would add Me.Requery.QueryName in the Event Procedure for the button??
 
Thanks Pat, much appreciated. I can see it all working now and think it's finally sunk in...I have to do some testing on a few other things so hope it all fits together. May have a couple more questions though ;-)
 

Users who are viewing this thread

Back
Top Bottom