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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserForm Search Using Two Data Search Criteria and Export the Receipt

Status
Not open for further replies.

Chimpanzo1988

Programmer
Jun 26, 2019
2
AO
Hello folks And I created a database of monthly payments from the workers of certain transport organization. The spreadsheet contains two ComboBox:

The first one called cboLocation (text lable = Name) - where the list of employee names is located

The second named CmBoxMeses (text lable = Period) - where the respective months of payment are located.


If I select a name in the combobox cboLocation (text lable = Name) and click the Search button it fetches me data only for the month of May. and if the same employee is paid the following month (June)?

In this case what I intend is:

1 --- select the Name (in the combobox cboLocation) and the Specific Payment Period (in the combobox CmBoxMeses)

So he searches me for the data for that month. and If only sellect the name in the combobox cboLocation it should give an alert saying that "Selects the Period Desired"

2 --- Use the Receipt Button on the UserForm so that when clicked it exports the searched data to the "Receipt" sheet (filling it out of the box and creates a pdf that can be delivered to the employee.

Here's the spreadsheet link ... Ejz_5_nxve

Thank you

Anilton Chimpanzo
 
Hi,

Welcome to Tek-Tips.

Is there a question? I didn't see one.

I certainly have a few.

Where is the "Receipt" sheet?

Why would you have a list of First-of-the-Month dates that will need to be maintained and is unnecessarily long. Why not simply a list of Months, to which you can calculate the first-of date for the appropriate year.

Why would you pre-load formulas in unused rows? Pre loading data unto unused rows, creates unexpected problems. If you were to use the Structured Table feature, those formulas will propagate to new rows as they are added to the table.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
You also have 10 modules, most of which have one procedure.

Module1 contains procedures for sheets that do not exist in your workbook.

Your organization is confusing and counterproductive.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
I'm close to posting a solution, but I have a question regarding the Period value that you want on the Receipt. I'd assume that you want the latest Period value. Or do you want to pick from a list of Periods for the selected Nome?

My solution will not have a UserForm. Rather it employs your Receipt as the form by using an in-cell drop-down list to select a Nome and possibly the Periodo also.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
???

Simao Jorge has 2 Jun rows, whereas all others have one row per period. That causes problems unless there is something I don't understand.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top