monkeytunes
Serf of the Jungle
- Local time
- Today, 02:05
- Joined
- Jun 8, 2004
- Messages
- 120
Hey buddays,
We recently sent out a questionnaire/suggestion list to a bunch of employees (several hundred) and are expecting responses soon. The questionnaire is in Excel format with two worksheets. The first sheet is locked/protected and only contains instructions for users. The second sheet is the questionnaire, and is locked/protected except for the designated fill-in-the-blanks: the usable range starts with row A6:F6, and users can fill in as many suggestions as they want. (The top ranges are taken up by company logo, field names, and two example inputs, all locked.)
I'm using one of the import database provided by IMO in this Excel-to-Access thread, which I've modified slightly for my usage. My problem is with defining those ranges mentioned above.
Currently I'm doing this:
DoCmd.TransferSpreadsheet acImport, , tblName, InputDir & ImportFile, True, "Sheet2!A5:F150"
("tblName", "Input Dir" and "ImportFile" are defined within the aforementioned database from IMO.)
The problem with naming the range A5:F150 is that I get tons of empty records - what if a user only puts in 2 suggestions? And what if a user puts in 155 entres? I'll lose data. How can I keep out null values while ensuring that I'm not losing data? Ideally, I'd go "Sheet2!A:F", but like I said, I have those top rows reserved, and the real data doesn't start until row 6. Is there a validation function or a way to prevent importing of blank rows?
Any ideas?
We recently sent out a questionnaire/suggestion list to a bunch of employees (several hundred) and are expecting responses soon. The questionnaire is in Excel format with two worksheets. The first sheet is locked/protected and only contains instructions for users. The second sheet is the questionnaire, and is locked/protected except for the designated fill-in-the-blanks: the usable range starts with row A6:F6, and users can fill in as many suggestions as they want. (The top ranges are taken up by company logo, field names, and two example inputs, all locked.)
I'm using one of the import database provided by IMO in this Excel-to-Access thread, which I've modified slightly for my usage. My problem is with defining those ranges mentioned above.
Currently I'm doing this:
DoCmd.TransferSpreadsheet acImport, , tblName, InputDir & ImportFile, True, "Sheet2!A5:F150"
("tblName", "Input Dir" and "ImportFile" are defined within the aforementioned database from IMO.)
The problem with naming the range A5:F150 is that I get tons of empty records - what if a user only puts in 2 suggestions? And what if a user puts in 155 entres? I'll lose data. How can I keep out null values while ensuring that I'm not losing data? Ideally, I'd go "Sheet2!A:F", but like I said, I have those top rows reserved, and the real data doesn't start until row 6. Is there a validation function or a way to prevent importing of blank rows?
Any ideas?