G
Guest
I have a form linked to a table. I have designed the form to accept entries,
edits and deletions. I have several questions in relation to command
buttons. Table fields are:
IDNo - Autonumber - primary key
RegisterNumber - Text - uses Me.NewRecord to create new number - primary key
DeptCode - Text - Table lookup using combo box
Designation - Text - Table lookup using combo box
DateSent - Date - =Date()
SentTo - Text
CompanyName(s) - Text
CopiedTo - Text
Subject - Text
Hyperlink1 - Hyperlink
Hyperlink2 - Hyperlink
Hyperlink3 - Hyperlink
UserName - Text - Captures user name using =fOSUserName()
UpdateLog - Text - Display audit log information if available
Reason(s)forEdit - Text
DeleteDate - Date - =Date()
DeptReqDel - Text - Table lookup using combo box
ReasonforDel - Text
PersonReqDel - Text - Captures user name using =fOSUserName()
Q1. I have three buttons; add new record, edit record, delete record. I
would like to place VB code behind these buttons to grey out certain fields
and NOT allow data entry/change depending on which button is selected e.g. if
add new record is selected I would like the control fields 'reasonsforedit',
reasonfordel, deletedate, deptreqdel, personreqdel etc..to be greyed out and
disabled.
Q2. I would also like to be able to validate fields with VB Code dependent
on whether it is entry, edit or delete to ensure that all data required has
been entered.
Q3. I have also have a print button to print the current recordset, using
the code provided by Allan Browne. How can I code to print the correct
report 'entry report' or 'edit report' or 'delete report'?
For information I am also using the audit log created by Alan Browne.
I would appreciate it if anyone could please help me as I understand very
little VB coding. I have tried using conditional formatting but could not
get the box to grey out.
edits and deletions. I have several questions in relation to command
buttons. Table fields are:
IDNo - Autonumber - primary key
RegisterNumber - Text - uses Me.NewRecord to create new number - primary key
DeptCode - Text - Table lookup using combo box
Designation - Text - Table lookup using combo box
DateSent - Date - =Date()
SentTo - Text
CompanyName(s) - Text
CopiedTo - Text
Subject - Text
Hyperlink1 - Hyperlink
Hyperlink2 - Hyperlink
Hyperlink3 - Hyperlink
UserName - Text - Captures user name using =fOSUserName()
UpdateLog - Text - Display audit log information if available
Reason(s)forEdit - Text
DeleteDate - Date - =Date()
DeptReqDel - Text - Table lookup using combo box
ReasonforDel - Text
PersonReqDel - Text - Captures user name using =fOSUserName()
Q1. I have three buttons; add new record, edit record, delete record. I
would like to place VB code behind these buttons to grey out certain fields
and NOT allow data entry/change depending on which button is selected e.g. if
add new record is selected I would like the control fields 'reasonsforedit',
reasonfordel, deletedate, deptreqdel, personreqdel etc..to be greyed out and
disabled.
Q2. I would also like to be able to validate fields with VB Code dependent
on whether it is entry, edit or delete to ensure that all data required has
been entered.
Q3. I have also have a print button to print the current recordset, using
the code provided by Allan Browne. How can I code to print the correct
report 'entry report' or 'edit report' or 'delete report'?
For information I am also using the audit log created by Alan Browne.
I would appreciate it if anyone could please help me as I understand very
little VB coding. I have tried using conditional formatting but could not
get the box to grey out.