Desperate

kbreiss

Registered User.
Local time
Today, 21:39
Joined
Oct 1, 2002
Messages
228
Not for sure how to ask this and I'm open to any suggestions....
I have an appointment scheduler...users can update, add or delete any appointments. The problem now is everyone is wondering, "well, you deleted/updated who." So I plan on implementing an Operator ID that when users click the SAVE or UPDATEbutton, it runs a macro that runs a query and prompts them for their Operator ID. I know if it is an update transaction the query should be an update query and an addition transaction, insert query. My problem is...is it possible to prompt them for their Operator id and then whatever they type in the promt box, insert that number into the Operator ID field of the table Appointments?


Thanks in advance,
Kacy
________
Chrysler pt cruiser specifications
 
Last edited:
Are you using Windows 2000? If have a function I use that can automatically detect the Windows login ID. And I use that in forms to automatically insert their ID into a new record.
 
Here's a thread for you.
 
Thanks for responding......
Rob - We're using Windows 2000, but use Novell for the log in.

Mile-O-Phile - I tried the code you had posted on the other thread, but not for sure what to do after I've copied the code into the Module. I saw you said to make the DefaultValue of your table =GetUserName(). In my case would I make a UserName field in the Appointments table with that default? If this is the case, would the UserName field get updated if the Appointment was rescheduled by someone.

I'm ultimately trying to put a control so we can go look and see what user did what to the appointments.

Thanks in advance and for your help,

Kacy
________
Steroid Rehab Dicussion
 
Last edited:
kbreiss said:
I saw you said to make the DefaultValue of your table =GetUserName(). In my case would I make a UserName field in the Appointments table with that default? If this is the case, would the UserName field get updated if the Appointment was rescheduled by someone.

As long as the textbox has it's Default Value set to =GetUserName and the texbox has its ControlSource set to your table then you should get the results you want.
 
GREAT!!! I'm getting closer....I've got the text box able to display the user name. The control source for the entire form is a query. When I leave the textbox "unbound" and use the =GetUserName() for the default ...it works. But when I save the record I would like for it to save to my User_ID field in my table. I can't get it to work if I set the Control Source for the textbox to the User_ID field.....

Any Suggestions?

Thanks,
Kacy
________
Coach handbags
 
Last edited:
If it's a new record it works fine....it is inserting the user name into the UserName field of the table Appointments. What I'm trying to get at is if somebody updates the appointment "Clicks Save" I would like for their User Name to be inserted into the UserName field of Appointments.

Thanks again
Kacy
________
Lovely Wendie99
 
Last edited:
I'm still having the problem of the UserName textbox not being updated into my table when they are updating a record. I'm now trying to write a query that will update the User_ID field into the table. Here the query that I have written and the error that it is generating.

UPDATE APPOINTMENT SET APPOINTMENT.User_ID = [FORMS]![APPOINTMENT].[txt_UserName]
WHERE (((APPOINTMENT.DL_NUM)=[FORMS]![APPOINTMENT].[DL_NUM]));



CDL can?t update all the records in the update query.

CDL didn?t update 1 field(s) due to a type conversion failure, 0 record(s) due to key violations, 0 record(s) due to lock violations, and 0 record(s) due to validation rule violations.
Do you want to continue running this type of action query anyway?
To ignore the error(s) and run the query, click Yes.
________
Children Wellbutrin
 
Last edited:

Users who are viewing this thread

Back
Top Bottom