QlikView Load scripts can be divided in sections, where one particular section type - called "Application" - does the expected things with statements and tables to generate a data model, and another section type - called "Access" - does secret things to create a security set-up. Although the statements in section Access look similar to those used in section Application, they do different things.
A section is marked at the start using a statement that indicates its type. A new section statement ends the previous section and starts a new one with the indicated type. Section Application and Section Access can be repeated as many times as you want, and in any order. Statements in Section Application affect the data model and those in Seciton Access affect the security set-up. There is always a section active. If you do not specify a Section statement, the default section type will be "Application".
If you only use a Section Access; statement at the beginning of your (possibly hidden) script, and no subsequent Section Application; statement, everything will go into the security set-up, and no data model will be available at the end of script execution. Apparently, you also get weird error messages about missing fields (although they're probably there all right). Add a Section Application; statement after the last statement of your Section Access;, to make sure that subsequent LOAD statements build a regular data model.
[Edit] A shorter explanation by Qlik is given here: Security ‒ QlikView - see the paragraph titled "Sections in the Script".
Be careful by using section access - you could yourself lock out and loose an application without having backups. Here you will find many informations about Section Access and I suggest to start with the introduction.
Here is my script. Now I have and issue that if I login with the user he can still see everything.
Thanks, noted. I have a backup copy with no section access.
LOAD * INLINE [
ACCESS, USERID, PASSWORD, REGION
ADMIN, ADMIN, ADMIN,
USER, CHRIS, CHRIS1, CENTRAL
USER, ERIN, ERIN1, EAST
USER, SAM, SAM1, SOUTH
USER, WILLIAM, WILLIAM1, WEST
Load [Row ID] as OrderRowID,
Upper(Region) as REGION,
[Customer Name] as CustomerName,
[Province] as CustomerProvince,
[Customer Segment] as CustomerSegment
FROM $(qvdpath)\Customers.qvd (qvd);
Upper(Manager) as MANAGER,
Upper(Manager) as USERID
FROM $(qvdpath)\Users.qvd (qvd);
I have tried it different ways, something is just not working