@Becky88
The password is normally the one you use to access the printer on the network, that is, your Wireless password.
Find Your Wireless WEP, WPA, WPA2 Password
Install and Use the HP Smart App (Android, Apple iOS, iPadOS)
Printing from an iPhone, iPad, or iPod Touch
If you are using Wi-Fi Direct, that is, wireless without the benefit of a router,
Printing with Wi-Fi Direct
More References
User Guide
Chapter 8 - Connect Your Printer - starting on Page 81
Printing with Apple AirPrint (iOS)
Reference and Resources – Places to find (more) help and learn about your Printer
Clarification of terms and "what the printer can do" (Specifications)
Printer Homepage – “Things that are your printer”
NOTE: Content depends on device type and Operating System
HP Drivers / Software / Firmware Updates, How-to Videos, Bulletins/Notices, Lots of How-to Documents, Troubleshooting, Access to the Print and Scan Doctor (Windows), User Guides, Product Information, more
When the website support page opens, Select (as available) a Category > Topic > Subtopic
HP OfficeJet 5740 e-All-in-One Printer series
Thank you for participating in the HP Community Forum.
We are a world community of HP enthusiasts dedicated to supporting HP technology.
Merry Christmas 2019
Dragon-Fur