Please Help a Novice!!

  • Thread starter Thread starter Jimmy Saville
  • Start date Start date
J

Jimmy Saville

Guest
At the moment I am trying to build an access db, one of the things I want to do is use a form where the user types a unique id, the db then goes to another form which is pre-populated with his details, (which come from a user table). How do I get the form to be prepopulated with the correct info?
I hope this is enough for you to go on!

Thanks!!
 
I dont know if its a security issue that you want the 'unique number' for or just to make the user seperate from all the other people that are using youre database?

If its security, then you will need to know a bit of SQL and are looking at a lot of work! I mean heavy shit!

If its the fact that you want JOHN to be number 1, CHRIS to be number 2, e.t.c.
Then thats simple. In design view, where you name your fields in the table and choose text or number or whatever, simply call the top row/first field 'UNIQUE ID', choose Number AND make it the primary key! - as far as actually entering your database and someone being able to type that number in and get to their own data - your taklking about e-commerce and internal security!!! and sub-forms are a pain in the butt too!

If you explain to me what the database is about and what you are using it for, i could give you some ideas and perhaps even change one that i already have??
 
It's a database for the logging of service access requests. I have a table of user details. The user id is the primary key here.
What i want to do is when I log a request a form pops up and you enter the user id of the person making the request. If the user has already made a request in the past, the service form appears with his details pre loaded into the relevant places on the form (like location, name, telephone no.) so all I need to fill in is the system they want access to. If they have never been entered onto the system a form to enter all the user details comes up before you get to the access request form.
*phew* I guess what I need is, the initial form runs a query on the user table, and the details from that query are entered into the access request form automatically, if that query returns nothing, then the user form appears, you enter the user details and then the access request form opens with these details in place. Sorry for all the info at once, but thanks for your time!
 
Hi Jimmy,
Perhaps you could try this:

1. Create a form bases on your user table containing all the fields you require.
2. Add an unbound combi field at the top to look up your ID (use the combi box assistant and name the combi box ID2) (example)
3. In the afterupdate event of this combifield add the following code.

If dcount("*","Your user table","[KeyID]=" & me.ID2)>0 then
docmd.applyfilter, "[KeyID]=" & me.ID2
else
msgbox "New User - Please enter the details"
docmd.gotocontrol "KeyID"
end if

This means
"If the record is there - show me - else - tell me to create it"

Hope this helps - if you supply an E-Mail I can send you an example

Marion
Germany

[This message has been edited by MarionD (edited 03-06-2001).]
 

Users who are viewing this thread

Back
Top Bottom