mloucel
Member
- Local time
- Today, 10:35
- Joined
- Aug 5, 2020
- Messages
- 356
This might be an old thing for all of you..
I have my form and all is working, some records on my table (fname, lname, etc, and some combo boxes generated from a query on the database) MUST have something, and by using on the table the option of (THIS RECORD MUST NOT BE EMPTY [OR REQUIRED = YES]) THAT SHOULD MAGICALLY SOLVE THE PROBLEM , well I imagine wrong, I can navigate from record to record on the form and Access takes the record or saves the record no matter what I said on REQUIRED, so I am toasted, yes is probably not a big deal since the EU can come back and just fill the empty spaces, but here it is my mind thinking a bit ahead of myself..
I figured that some code like:
If IsNull(Me.Location_ID) Then
Me.Location_ID.BackColor = vbRed
MsgBox "Cancelling update"
Me.Location_ID.SetFocus
Else
Me.Location_ID.BackColor = vbWhite
End If
this I IMAGINE could go in the form current
but what if I need to check 4 or 5, what if my end user clicks my SAVE button then do I have to repeat the code, what if it uses the navigation on the bottom..
is there a way to accomplish this, I believe there is..
This is of course not a dead or alive situation, but I would like to make sure that at least the end user fills Location and Certificate type, just to make sure I have at least those..
Thank you GURUS..
Maurice.
I have my form and all is working, some records on my table (fname, lname, etc, and some combo boxes generated from a query on the database) MUST have something, and by using on the table the option of (THIS RECORD MUST NOT BE EMPTY [OR REQUIRED = YES]) THAT SHOULD MAGICALLY SOLVE THE PROBLEM , well I imagine wrong, I can navigate from record to record on the form and Access takes the record or saves the record no matter what I said on REQUIRED, so I am toasted, yes is probably not a big deal since the EU can come back and just fill the empty spaces, but here it is my mind thinking a bit ahead of myself..
I figured that some code like:
If IsNull(Me.Location_ID) Then
Me.Location_ID.BackColor = vbRed
MsgBox "Cancelling update"
Me.Location_ID.SetFocus
Else
Me.Location_ID.BackColor = vbWhite
End If
this I IMAGINE could go in the form current
but what if I need to check 4 or 5, what if my end user clicks my SAVE button then do I have to repeat the code, what if it uses the navigation on the bottom..
is there a way to accomplish this, I believe there is..
This is of course not a dead or alive situation, but I would like to make sure that at least the end user fills Location and Certificate type, just to make sure I have at least those..
Thank you GURUS..
Maurice.