Blank Field in Report!

GirishBreakTheRules

Registered User.
Local time
Today, 03:50
Joined
Oct 25, 2007
Messages
22
hey guys,

am actually building a scholarship system...i have report that generates the field of study of particular candidates. A candidate can opt for one or more subjects. Among a maximum of 3 he/she may just opt for 2. I have 3 textboxes.

The fing i want to du is that i dnt want to disply blank records in my report, for example if the candidate mentioned only 2 subjects..1 want only these 2 to appear in my records!

can anyone help me?

kind regards
Thanx
 
Simple Software Solutions

Hi

I assume that you are collecting the data in 3 separate fields. And in your report you are displaying the records vertically. Thus

Record 1
Subjects
[Subject 1]
[Subject 2]
[Subject 3]


Record 2
Subjects
[Subject 1]
[Subject 2]
[Blank Line]

Etc.

If this is the case then make sure that each field can shrink and grow and any blank rows will shring the report. This will only work if you do not have anything adjacent to the controls that will prevent the shrinking of the section.

Alternatively you could be a bit more aventurous and add the following

= Replace([Subject1] & vbNewline & [Subject2] & vbNewline & [Subject3],vbNewline & vbNewLine,vbNewline)

The above concats all the subjects together with carriage returns between them (vbNewline). The replace then checks for any instances or 2 carriage returns together (vbNewLine & vbNewLine) and replaces them with a single carriage return.

This will ensure that the minimum amount of vertical space has been used.

Code Master::cool:
 

Users who are viewing this thread

Back
Top Bottom