Form Problems

  • Thread starter Thread starter Froto
  • Start date Start date
F

Froto

First problem I'm having is with trying to get code to do
the following. When a user fills in the form and selects
the submit button, the form is saved and message pops up
saying form has been saved, but what I need to have
happen also is when the user still has the form open
after submitting it and decides to make some chages to
the form, when he selects the submit button the second
time, I would like to have a message popup saying
something like, form has already been saved, would you
like to overwrite previous form.

My second problem is with a checkbox with the following
code:

If Me!Check55 = True Then
Me!MolecularWeight.BackColor = vbYellow
Me!MolecularFormula.BackColor = vbYellow
Else
Me!MolecularWeight.BackColor = vbWhite
Me!MolecularFormula.BackColor = vbWhite
End If
If Me.Check55 = -1 Then
MolecularWeight.SetFocus
End If

What's happening is when a user checks the box, they are
required to fill in the 2 textboxes below the checkbox,
but if user needs to uncheck or has accidently check the
box and needs to uncheck it, it doesn't allow him to do
so, but keeps popping up with the warning box requiring
him to enter values in those textboxes. What code would I
need to change or add to help correct my 2 problems. Any
help is much appreciated.

Thanks in advance
 
-----Original Message-----
First problem I'm having is with trying to get code to do
the following. When a user fills in the form and selects
the submit button, the form is saved and message pops up
saying form has been saved, but what I need to have
happen also is when the user still has the form open
after submitting it and decides to make some chages to
the form, when he selects the submit button the second
time, I would like to have a message popup saying
something like, form has already been saved, would you
like to overwrite previous form.

My second problem is with a checkbox with the following
code:

If Me!Check55 = True Then
Me!MolecularWeight.BackColor = vbYellow
Me!MolecularFormula.BackColor = vbYellow
Else
Me!MolecularWeight.BackColor = vbWhite
Me!MolecularFormula.BackColor = vbWhite
End If
If Me.Check55 = -1 Then
MolecularWeight.SetFocus
End If

What's happening is when a user checks the box, they are
required to fill in the 2 textboxes below the checkbox,
but if user needs to uncheck or has accidently check the
box and needs to uncheck it, it doesn't allow him to do
so, but keeps popping up with the warning box requiring
him to enter values in those textboxes. What code would I
need to change or add to help correct my 2 problems. Any
help is much appreciated.

Thanks in advance
.
Hi Froto,
Firstly, you might like to consider in future using
separate posts for each question when they are unrelated.

a1 - consider using a combination of save and edit
buttons. that is a record is read-only until the edit
buttom is clicked. when the save button is clicked the
record is saved and then reverts to read-only. thus a user
knows that they are editing an existing record.

a2 - no idea... unless it's possibly that the two
textboxes have as control source fields that are part of
referencial integrity joins. if 'yes' then revert to
simple join.

Luck
Jonathan
 
Back
Top