Report "diagram" / picture and fields

Valery

Registered User.
Local time
Today, 02:37
Joined
Jun 22, 2013
Messages
363
Hi everyone,

I will attempt to explain this best I can by taking an example other than what I am doing... to simplify my request.

Let's say you have a classroom diagram - student seat, windows, blackboard... and so on. It is in the report as a picture.

I want to position the name of the students in their seats. I want this to update as the student list is updated.

How would I format the report to achieve this? If I put my control in the details, I get every student as a list, not as an individual programmed control. I tried inserting the controls into the page header, page footer, report header, report footer and, yes, a group header and footer (!) ... nothing works.
 
use unbound report.
you have to put unbound textboxes or labels.
arrange them and name them as you would have for seats, ie:

if in your table you have a field seatno, and seatno has value "A1", then rename your textboxes/label the same (A1).

on Load of report just open the table, and assign value to texboxes, or caption to label control, something like:

private sub form_load()
dim db as dao.database
dim rs as dao.recordset
set db=currentdb
set rs=db.openrecordset("tableName")
rs.movefirst
with rs
while not .eof
me.Controls("Seat" & .Field("SeatNo"))=![Student Name]

'if label
' me.Controls("Seat" & .Field("SeatNo")).Caption =![Student Name]
.movenext
wend
.close
end with
set rs=nothing
set db=nothing
end sub
 
I understand. Will post a copy. I don't think it is that simple because of the links I have.

Thank you!
 
Ok - here it is. This is the diagram of the COOP parking lots and spaces. I would like the full name of the tenant and Unit Number to appear in the control box - if no tenant has the parking lot - the tblParkingAdmin, PkgType field content should appear there instead as some spaces are, for example, reserved for firetrucks... That field will indicate that.

FYI: If a new tenant gets a space that was previously used by someone, it is indicated by StartDate, EndDate. When the EndDate is not null, the space is taken. FYI: my data entry form accounts for that - an allocated space cannot be selected. This is not the issue here but thought you should know.

The data in the sample is "fake". You will see that the lot B and space 1 is taken. It is a good one to use as an example to see if the report is working or not...

Please let me know if I can clarify anything. Thank you for attempting this, lol ! Not sure about the title of my post to ensure it will help someone else than myself!
 

Attachments

hello ms.valery, i will take a look. i will modify your report based on the sample data you provided.

on your actual data, you will have to modify the report (add/or edit controls).

one more thing i will do the parking, left to right, and top-down, based on your image.
 
Last edited:
Of course! My pleasure! So this is doable then? WOW!

"one more thing i will do the parking, left to right, and top-down, based on your image." That was my intent all along! Terrific!
 
Last edited:
i noticed that you have made some controls on the form so i just followed it.
the paper is small so i have to adjust the images and the size of the labels.

please see the code behind the report.

i have not yet done what i have intended to do with my first concept of design.
 

Attachments

These are labels, right? Not text boxes. How does this work since there is no record source? Is it all done through VBA? Amazing. So I can delete my query, right? How will the names change automatically when a new tenant is assigned the parking space? I am really interested in knowing how you accomplished this.

THANK YOU!
 
Last edited:
I must be doing something wrong. I allocated a parking space, in the table, to a tenant. But her name does not appear in any of the labels?

"Ok - here it is. This is the diagram of the COOP parking lots and spaces. I would like the full name of the tenant and Unit Number to appear in the control box - if no tenant has the parking lot - the tblParkingAdmin, PkgType field content should appear there instead as some spaces are, for example, reserved for firetrucks... That field will indicate that."

The report seems to be showing the content of the field PkgType... It is not picking up the name now allocated to that space through the data entry in the table.
 
Last edited:
are you using it live? you have to close the report and open it again, to see changes.
the report is just a snapshot of what is in the table at the time the report is generated.
it does not refresh.

remember the module i share with you last time (IsReportedLoaded).

on click of a button that show your report, test if it is already open.
if open, close it.

private sub sendReport_Click()
'if open close it to get new data
If IsReportLoaded("yourReportName") Then DoCmd.Close acReport, "yourReportName"
'open the report
DoCmd.OpenReport "yourReportName"
end sub
 
are you using it live?

Yes, this is why my boxes had all the IIF statements...

you have to close the report and open it again, to see changes.

I did

the report is just a snapshot of what is in the table at the time the report is generated.
it does not refresh.

Does not refresh AT ALL or unless I close it and reopen? Anyway - did both - and the new tenant name did not show up

remember the module i share with you last time (IsReportedLoaded). on click of a button that show your report, test if it is already open. if open, close it.

Honestly, I don't understand the coding per say... I am a novice you know. I thought the refresh was being done in there. The challenge of the report is to have it "live".
 
I understand that but still that name does not show up

on the demo db that you uploaded, is tblParkingAdmin table also a demo.
i based my report on that table.
if it is not complete then it will not show up, since i am using PkgSpaceID as my label's name.
 
tblParkingAdmin contains all the spaces and type of parking. tblParkingAlloc indicates the tenants that have been assigned to the available parking spaces. Both tables are needed. In my text boxes, I am saying: if there is no tenant here (tblAlloc), use the content of the field in tblParkingAdmin.
 
cant tell really what is going on the report, if possible upload your new tblParkingAlloc. only this one will do.
 
That table was in the sample database. You don't have it? The report and the query I provided would not work without it. It is called tblParkingAlloc (for allocated)
 
i have 5 records showing in the report. SALINGER, Jerome David has two entry on the table but the first instance his parking alloc has expired.

this is the same on your condition that if the prkenddate is null it will be included.
also i added condition, that if it the prkenddate is not null but is not expired (meaning the date is less than todays date), he/she will be included in the report.
 
The data is ficticious to test. And, yes, Salinger or any other tenant may be there twice as they can own more than one vehicle, so have more than one parking space.

i have 5 records showing in the report. SALINGER, Jerome David has two entry on the table but the first instance his parking alloc has expired.

Yes, I had plan to arrange the condition you did below

this is the same on your condition that if the prkenddate is null it will be included. also i added condition, that if it the prkenddate is not null but is not expired (meaning the date is less than todays date), he/she will be included in the report.

That is terrific - I am simply not knowledgeable enough to write those things. This is probably something I would have posted later on... null but not expired - fabulous!
 
Last edited:
Thank you Arnel for the response.

The tblParkingAlloc is, both, in the sample you sent back to me and the one I originally sent to you. So I am confused as to what you would like me to post.

You wish for me to resend the original sample database, or the one you provided back to me or create a new one all together?
 
Last edited:
Hi Arnel,

Just wondering if you are still working on this mega challenge, lol ! Do you need any files? Please let me know.

Anyone else out there that would like to help?

THANK YOU All!
 

Users who are viewing this thread

Back
Top Bottom