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??
9 1481
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.
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
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
[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??
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?
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???
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.
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
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 Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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 ...
|
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...
|
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,...
|
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...
| |
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...
|
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-...
|
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...
|
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...
|
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
|
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...
| |
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...
|
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...
|
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |