Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show multiple records in a single form

Status
Not open for further replies.

rperre

Programmer
Jan 25, 2005
39
US
Hello,

Is it possible to view more than 1 record in a single form without using subforms?

I have made a scheduling database and every record has a full week of call duties, in my case however a full schedule consists of 5 records! I can show this easily in a report, but can't seem to find how to show this in a form, I want the user to be able to change names while looking at 2 weeks of scheduling.

Example:
Monday Tuesday ..........etc.
Call 1: Person1 Person2 ..........etc. "this is record 1"
Call 2: Person3 Person4 ..........etc. "this is record 2"
Call 3: ................ "you got my drift"
.etc....

Can anybody put me in the right direction?

Thank you,

Richard
 
I did the records wrong, the way I do it in the other post is easy enough, daaaa

This is the situation:

"record1""record2"".........etc.
Call 1: Person1 Person2 ..........etc.
Call 2: Person3 Person4 ..........etc.
Call 3: ................
.etc....
 
What have you got against subforms? I guess you could do this with unbound controls, but it seems like a lot of work. [ponder]
 
Hey Remou, thank you for the reaction

I just can't figure out how to bind the subform to the next record, it would work and I tried it, but I can't seem to figure it out.
How do I show 5 different records using 4 or 5 subforms?

Thanks

Richard
 
I must be misunderstanding something. How did this work in the report? Why does it have to be 4 or 5 subforms? [sleeping2]
 
You know Remou, you are right I should explain it better and I didn't mean 4-5 subforms but just 1.
If I do it like the report, I can show 1 week on my form and make changes like normal, but now I want to show a several weeks, but will start with only 1 extra, with a subform that is. How can I point the subform to a Different record than the one showing.

But the original question still remains also, how can I show a "next" or "previous" record in ONE Form! What's the code for it? I thought this was possible.

Like everything, I will probably figure it out, I was just hoping for a little help in the right direction.

Richard
 
I think I understand now (though I may still be asleep :)).
How about a Form with a subform and code like this:
Code:
Private Sub Form_Current()
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.MoveNext
Me.[i][Subform Control Name][/i].Form.RecordSource = "Select * From [i]tblTable[/i] Where [i]Key =" & rs!Key[/i]
rs.Close
Set rs = Nothing
End Sub
It should work in reverse too, though you will need to check for beginning and end of file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top