473,513 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with report

5 New Member
Hi,

I have a membership table where I collect the birthdays.....I separated the fields in to 'BirthDateDay', "BrithDateMonth', BirthDateYear'.... I also collect other birthdays for example wife birthdays, i have also separated them like the normal birthdays...
I then created a query that shows me all birthdays ('BirthDateMonth' and 'WifeBithDateMonth') that is in January which is simple.

What i am try to do with that is create a report where the date is sorted into alphabetically order and where only the month of January is showing...
for example if someone wife's birthday is in January and his birthday is in another month i.e. march, i want only the wife's birthdays to show...

what i have done so far is in the control source of the two textboxes in the report is if the BirthDateMonth or WifeBithDateMonth is not Januray that textbox should be blank e.g.
=IIf([BirthDateMonth]="January",[BirthDateDay] & " " & [BirthDateMonth]," ")
or
=IIf([WifeBirthDateMonth]="January",[wifeBirthDateDay] & " " & [wifeDateBirthMonth]," ")

The problem with that their a lot of blank spaces and that i the date sorted in alphabetically of date and into tabular form? The problem is i am having is setting the textboxes to false??
May 20 '07 #1
9 1481
puppydogbuddy
1,923 Recognized Expert Top Contributor
I think the easiest way to do this is to:

1. You only need one textbox, so delete one and change the control source of the remaining one to>>>>> Enter a month name

Place the following commands in your report launcher or button that launches each report:
Report #1
DoCmd.OpenReport "YourReportName", acViewPreview, , "[BirthDateMonth] = '" & [yourTextboxName] & "'"

Report #2
DoCmd.OpenReport "YourReportName", acViewPreview, , "[WifesBirthDateMonth] = '" & [yourTextboxName] & "'"

When the report opens, it should prompt you to enter the month name, and then return the desired results.
May 20 '07 #2
richdude
5 New Member
I think the easiest way to do this is to:

1. You only need one textbox, so delete one and change the control source of the remaining one to>>>>> Enter a month name

Place the following commands in your report launcher or button that launches each report:
Report #1
DoCmd.OpenReport "YourReportName", acViewPreview, , "[BirthDateMonth] = '" & [yourTextboxName] & "'"

Report #2
DoCmd.OpenReport "YourReportName", acViewPreview, , "[WifesBirthDateMonth] = '" & [yourTextboxName] & "'"

When the report opens, it should prompt you to enter the month name, and then return the desired results.
doesnt this create to seperate reports, i want all in the same report
May 21 '07 #3
puppydogbuddy
1,923 Recognized Expert Top Contributor
doesnt this create to seperate reports, i want all in the same report
[font=Tahoma]It is your same base report (the one with the query for all records). You would just open this same base report with the additional criteria added as shown. Here is how it works: If you enter January into the textbox and click button #1, you will get all birthdays for January; if you click button #2 you get all wifes birthdays for January. If you leave the textbox blank and click the button, you’ll get all birthdays or all wifes birthdays, as applicable.[/font]

[font=Tahoma] [/font]

[font=Tahoma]Button#1[/font]

[font=Tahoma]Private Sub btnBirthdays_Click()[/font]

DoCmd.OpenReport "YourBaseReportName", acViewPreview, , "[BirthDateMonth] = '" & [yourTextboxName] & "'"

End Sub



Button#2

Private Sub btnWifesBirthdays_Click()

DoCmd.OpenReport "YourBaseReportName", acViewPreview, , "[WifesBirthDateMonth] = '" & [yourTextboxName] & "'"

End Sub
May 21 '07 #4
richdude
5 New Member
[font=Tahoma]It is your same base report (the one with the query for all records). You would just open this same base report with the additional criteria added as shown. Here is how it works: If you enter January into the textbox and click button #1, you will get all birthdays for January; if you click button #2 you get all wifes birthdays for January. If you leave the textbox blank and click the button, you’ll get all birthdays or all wifes birthdays, as applicable.[/font]

[font=Tahoma] [/font]

[font=Tahoma]Button#1[/font]

[font=Tahoma]Private Sub btnBirthdays_Click()[/font]

DoCmd.OpenReport "YourBaseReportName", acViewPreview, , "[BirthDateMonth] = '" & [yourTextboxName] & "'"

End Sub



Button#2

Private Sub btnWifesBirthdays_Click()

DoCmd.OpenReport "YourBaseReportName", acViewPreview, , "[WifesBirthDateMonth] = '" & [yourTextboxName] & "'"

End Sub
i am sorry, i am not understanding it you want me to create to buttons in a report??
May 21 '07 #5
puppydogbuddy
1,923 Recognized Expert Top Contributor
i am sorry, i am not understanding it you want me to create to buttons in a report??
No, I assumed you had a reports launcher. How do you launch your reports? Don't you have a switchboard or reports menu form with buttons (or other ways) to select a specific report from a list of reports?
May 22 '07 #6
richdude
5 New Member
No, I assumed you had a reports launcher. How do you launch your reports? Don't you have a switchboard or reports menu form with buttons (or other ways) to select a specific report from a list of reports?
thank you and sorry for the confusion.... let me try something new that seems to hard to do......

is it possible with access to take two fields and combine the data to put into one long field???
May 26 '07 #7
puppydogbuddy
1,923 Recognized Expert Top Contributor
thank you and sorry for the confusion.... let me try something new that seems to hard to do......

is it possible with access to take two fields and combine the data to put into one long field???
Yes, it can be done. As an example, you can concatenate fields for lastName and firstName by putting the following expression in a textbox txtFullName on a form.

txtFullName = [FirstName] & [LastName]

where txtFullName is bound to a field called FullName in your table. There are other ways to combine data fields. Whether such a combination is meaningful depends on the application.
May 27 '07 #8
richdude
5 New Member
Yes, it can be done. As an example, you can concatenate fields for lastName and firstName by putting the following expression in a textbox txtFullName on a form.

txtFullName = [FirstName] & [LastName]

where txtFullName is bound to a field called FullName in your table. There are other ways to combine data fields. Whether such a combination is meaningful depends on the application.
Thank You for the reply...
With this it just puts [FirstName] & [LastName] next to each other on the same line is it possible to put them on seperate lines

Thank You
May 30 '07 #9
puppydogbuddy
1,923 Recognized Expert Top Contributor
Thank You for the reply...
With this it just puts [FirstName] & [LastName] next to each other on the same line is it possible to put them on seperate lines

Thank You
You can put spaces between them like this: [FirstName] & " " & [LastName]

For separate lines, you can try:

[FirstName] & vbCrLf & [LastName]

or other syntax discussed in this thread:
http://www.thescripts.com/forum/thread199729.html
May 30 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3972
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
5
2785
by: MGFoster | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've converted an ACC97 .mdb file to an ACC2K2 .adp. A report that worked in ACC97 doesn't work in ACC2K2. Report setup: ACC97 ...
1
1535
by: Simon Matthews | last post by:
Hope someone can help an Access beginner! I've just started keeping my surgical logbook on access and it's a simple flat-file affair. I have created several queries that will list cases...
5
2189
by: Steve Patrick | last post by:
Hi All You guys are my last hope, despite spending money on books and hours reading them I still can not achieve the results I need. I have designed a database in Access 2000 based on 1 table,...
15
4385
by: Richard Hollenbeck | last post by:
I tried to ask this question before on the 14th of January but I never got a reply. I'm still struggling with the problem. I'll try to rephrase the question: I have a crosstab query with rows...
3
3778
by: Deasun | last post by:
I need some help please! Crystal is driving me nuts. Heres my code so far, see below. Problem: On the .export() line it comes back with error #5 Login failed! I know the login info is good so...
1
4150
by: PlumeProg | last post by:
Hello, I can't find a way to bind a dataset at runtime as a source for my report source. I looked into msdn and found some sample : ms-...
6
4962
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
3
1762
by: DeanL | last post by:
Hi guys, I'm in need of a little help with a report I'm setting up on Access 2000. The report shows data depending on entries on a form that has 7 fields (Min and Max Cost, Fiscal Year, Min and...
3
2990
by: jambonjamasb | last post by:
Hi I have two tables: email_tbl Data_table Data table is is used to create a Form Data_form
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5682
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.