Next record

Poot

Registered User.
Local time
Today, 00:03
Joined
Apr 9, 2003
Messages
23
Hello, have 5 text boxes that upon choosing a date from a combobox fill with data from my controlsource.

However, all boxes fill with the same control souce... I would like the next one along to fill with controlsource+1, then controlsource+2, etc.. so that I can have all of my data on screen at once without having to cycle through each record.

Is this possible? I know I can have a subform table that will show all data but I want to be able to just show the data that has been filtered from my combobox without having to cycle through the data using navigation buttons.

Thank you for any reply.

Regards,

Poot.
 
I'm not sure what you mean. The controlsource can be anything you specify provided it's in the underlying recordsource. Can you be more specific?
 
Check out "Continuous Forms" and Sub Forms in Help.
 
Are you talking about using a Continuous form? That would show all records in the form (recordset), not just the current record. Change the forms format "Default View" property to "Continuous Forms".

HTH
 
Last edited:
Aha....

Thank you.. something so simple as "continous form" -- heres me with a sore head thinking about answers that are needless and lengthy!!!..

I think I should go and buy a large book!

Thank you!
 
Hold on...

Nope.. I have tried that and it is the same problem.. only this time I get my results but it is all of them.... my combobox now only takes me to the first record with the value in the combobox!!

I would ideally ONLY get the results in the combobox....
 
I think it would help if you explained what you are trying to achieve in more detail, please.
 
k

Ok... my problem being is that I have a form (form1) and am choosing a company by using a combobox.

I then goto the subform and choose a date (from combobox) and the records - 5 records for each date - would ideally come up.

What I have is:

A continous form...... ALL records come up associated with company in a continous form! - choosing date onlys take me to the first record of that date!

A datasheet..... a singular record comes up - choosing date takes me to the first record of that date... I then am able to cycle through each record (but also can go into other dates records.)

What I woule like is:

To be able to choose the date.. then have the five records associated with that date come up. Remove navigation buttons etc... and only see those 5 records.

My first thought was that I might be able to associate text boxes with specific records. i.e. the first record (from choosing date) would go into the first textbox. Nextrecord into next box etc.. till I see the 5 records associated with that company and date. But instead I just get five text boxes all with the first inital record in it!

Thank you for any reply.

Poot.
 
Last edited:
bump

Hiya, I am attempting to only allow the user to cycle
through the records that they have specifically chosen
using a combobox.

What I have achieved so far is a form with a subform. The
form allows the users to choose a company name thus
bringing up their records. The subform then allows them
to choose a date from another combobox positioning them
to the first record with that date... they then have to
cycle through the remaining records with that date...

....my problem here is that I would just like them to see
ONLY the records of the date chosen. Is it possible to
just let them cycle through these records ( I have
created my own buttons for record navigation ) or can
someone point where I can easily just get these records
all to pop up (have tried using a continous form, though
I just get every single record ever and the date only
puts me to the first one of that date - no use to me)

maybe I just can't see what's wrong... been up too long!

Thank you for any reply.

Regards,
Poot.

P.S. Sorry to be a pain... either of these two things would suffice and I could get on..... thanks again!
 
Let's see where we stand...

1) you have a form containing company information

2) There is an associated subform with a combo box and five bound text box controls.

3) All the text controls have the same control source. The data you wish to display in them comes from different rows in the table.

If all these are true, you should have no problem in just displaying the data for any given date and any given company. It seems to me that you have something amiss with the structure of your tables or the relationship between your form and its subform. Please explain :

a) Where the company information is held

b) where the data you wish to display is held

c) the relationship you have set up between the two tables concerned.
 
Thanx

All the premises are correct so...

a) Where the company information is held

In "companyTable" = parent.Form

b) where the data you wish to display is held

In "availabilityTable" = subForm

c) the relationship you have set up between the two tables concerned.

Relationship 1:many from "companyTable" - "availabilityTable" using companyNumber as Primary and Foreign keys.

My first thought was that I might be able to associate text boxes with specific records. i.e. the first record (from choosing date) would go into the first textbox. Nextrecord into next box etc.. till I see the 5 records associated with that company and date. But instead I just get five text boxes all with the first inital record in it!

Is where I got confused... would have thought yes I would get the five sequential records and not five of the inital filtered from the combobox.



Thank you for your time and patience.

Poot.
 
To save time and misunderstanding, post a sample db. This task should not be presenting a problem. It's easier to look at what you're doing, rather than try to fathom it out blind.
 
okay

Hi ... I have attached the bare bones tables and forms that I am having problems with...

tables are populated with nonsense so far but shoudl be enough to see what is what...

the subform has buttons added that are to be removed -- they allow you to move around the records at present..

"allocationForm" is where the troubles are...

Thanks.

Poot.
 
Last edited:
OK, I now understand. Because you have five different text boxes bound to the same source, they must all display the same row of the table. That's unavoidable with your design . If you had a datasheet or tabular view, all the rows would display on separate lines and scroll bars would appear if the rows exceeded the screen's height. The individual rows would be selectable by record selectors. If you only wanted to display one row at a time, you'd restrict the display height to one row and use your nav buttons to move between records. Do you have some reason for not wanting to do this?

If you want to keep your text box layout, you must make them unbound and populate the rows by opening the underlying recordset and putting the data into the rows using code.


Which way do you favour?
 
hmm

Well... i was thinking that the "single form" would look better.... but if it's going to be exceptionally hard I'm not sure anymore....

Are you able to populate the rows, leaving the design as is, using SQL or does it involve VBA?

I was just wanting to be able to see all the room details at once without having to scroll to the immediate one desired....

(I did try with continous forms but only managed to get everything up at once- is this what you mean by tabular?)

Thanks again.

Poot.
 
Sorry, Poot,

my Internet connection failed for three hours. I have a solution for you. It does involve two or three lines of simple code though.

The form is opened using a combo for the hotel number. You can see all the records for the hotel and can filter the subform by means of a date combobox.

Will that suffice? I'll send if so. If not tell me exactly how you need to see the records.
 
I believe....

No worries...Ancient One.. and thank you for taking the time...

That sounds pretty much like what I am after, and I would be grateful if you would send that on...

Thanks again.

Poot.
 
Poot,

Sorry, I haven't forgotten you. I have had technical difficulties which prevent me from posting the zip file. I will post it on Monday morning at 0830GMT. Don't worry, your problem is solved. Apologies for the delay
 
Poot

Once again, sorry for the delay but here it is. It's frmHotel that selects the records.

I had forgotten that you cannot apply a filter to subform records. You can only change its recordsource. That is why the code is necessary. Also, the expression to filter the records requires you to have the date in US format in regional settings. I have forgotten how this can be overcome, but someone in the forum will know.


PS- do yourself a favour: take the spaces out of your field names and make them shorter!
 

Attachments

Users who are viewing this thread

Back
Top Bottom