Help With a Form

PsYc0TiC

New Member
Joined
Jun 26, 2015
Messages
17
I tried searching for this but didn't find anything that helped so here goes...

I have a database I made with a data table. The data table has 21 fields in it... 4 of which are calculated fields that require no input from a user with a form and are simply there to be retrieved by a report by me (along with any and all other data in the records).

I have 2 different groups that need to be able to input different data in each record in the database.

Example:

Data input form #1 - Inputs data in fields 1 through 14 (fields 15 & 16 are calculated for a percentage and auto populated)
Data Input form #2 - Inputs data in fields 17 through 19 (fields 20 & 21 are calculated for a percentage and auto populated)

I have no trouble making "Data Input Form #1" and submitting that data but I don't know how to make a separate form "Data Input Form #2" know and show all incomplete records needing fields 17 through 19 filled out and be able to fill them out one at a time until there are no more.

Does this make sense?

Thank you very much in advance for any and all help.


EDIT: Forgot to add... using Access 2010
 
Last edited by a moderator:
There are numerous videos on youtube for creating forms and queries in Access as well as hundreds of sites for learning Access. You really just need to get some basic lessons for yourself.

You know.... I read and read and read and watch videos and watch videos and watch videos and I still need to ask for help on things because unlike all you that "know it all" the examples are not anywhere near the same as what I am asking and all I ask for is a little help.

Telling me to go read and watch and learn the basics isn't help... it is just condescending.

Thanks anyway... I have gotten pretty far in this by reading and watching but just wanted a little more help without condescension.

Close thread
 
Last edited:
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
No one is trying to be condescending. It's just that the visual nature of building forms makes it much easier to learn from online tutorials than in thread discussions, that's all. Once you know how to create a form from a query, you can adapt that knowledge using your own query in your own database. Hopefully you have got it working now.
 
Upvote 0
Agree 100%. Sorry if you felt belittled, but I think you gave the impression that those links would be helpful. After all, in post 4 an 7 you referred to yourself as an absolute novice so those were meant to provide you with a good background from which you could gain a better understanding of the basic concepts. A forum like this is more so for guidance as opposed to teaching db design. It was my intention to provide information sources that I believe to be excellent and would at the very least help prevent you from falling into common traps. Hopefully you will not be discouraged from continuing to seek help here. Please also understand that as volunteers and given the difficulty in trying to teach design in a forum setting,we were trying to get you to where you would either adapt from the on line information, or at least elevate your knowledge to a point where you could better understand answers to your more grounded questions.
 
Upvote 0
Never the less after much reading and testing I was still having some troubles with some small details.

I was able to receive the help from someone that didn't just tell me to read something or go learn everything.... he just helped me and in doing so taught me a lot. See... I learn by example... not all examples are teaching me anything because they are not even close to what I am looking for and lacking the coding knowledge or parameter knowledge or syntax knowledge to understand by reading... I just needed someone to take me by the hand.

When I claimed to be an absolute novice it was more for explaining that I haven't built an access database since I used Windows NT and the database I made was a totally different monster than the simple one I needed here.

I don't use access for a living not will I probably need to use it again in my work... I was trying to help a coworker simplify his tasks to better the company. I was simply trying to present an idea to my company that will improve productivity for a handful of people and then work with the IT department to move this idea into a better QIS format.

It is okay... I understand completely that people on here are volunteers and are not required to help any or at all but when someone says, like I did, "I was able to accomplish this with this code but need a little help tweaking it for XXX reason" and the only response received is "you don't need to use code you should make a query"... that doesn't help at all and is just opinion and non productive if no example is given.

Don't worry folks... I managed to complete my task despite.

Thanks anyway.
 
Upvote 0
Out of curiousity, how did you end up tweaking that code?
ξ
 
Upvote 0
Out of curiousity, how did you end up tweaking that code?
ξ
First record create:
Option Compare Database

Private blnGood As Boolean

Private Sub PatInputSubmit_Click()
Dim strMsg As String

blnGood = True

If (validate) Then
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToRecord , , acPrevious
Me.Recordset.Edit
Me.Recordset.Fields("status").Value = "Waiting On Visual Inspection"
Me.Recordset.Update
DoCmd.GoToRecord , , acNewRec
Else
strMsg = "All Fields are required."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
blnGood = False
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String

If Not blnGood Then
Cancel = True
strMsg = "Please click the Update button to save your changes, " & vbNewLine & "or Escape to reset them."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
End Sub

Private Function validate() As Boolean
validate = True
If (IsNull(Me.Facility.Value)) Then
validate = False
End If
If (IsNull(Me.Part_Number.Value)) Then
validate = False
End If
If (IsNull(Me.PO_Number.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Received)) Then
validate = False
End If
If (IsNull(Me.RecDate)) Then
validate = False
End If
End Function
Second group record update:
Option Compare Database

Private blnGood As Boolean

Private Sub cboGoToRecord_AfterUpdate()
On Error Resume Next
Dim rst As Object
Set rst = Me.RecordsetClone
rst.FindFirst "AuditID = " & Me.cboGoToRecord.Value
Me.Bookmark = rst.Bookmark
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String

If Not blnGood Then
Cancel = True
strMsg = "Please click the Update button to save your changes, " & vbNewLine & "or Escape to reset them."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
End Sub

Private Sub Form_Current()
Me.cboGoToRecord.Value = Me.AuditID.Value
End Sub

Private Sub Vis_Input_Submit_Click()
Dim strMsg As String

blnGood = True

If (validate) Then
Me.Recordset.Edit
Me.Recordset.Fields("status").Value = "Waiting On Lab"
Me.Recordset.Update
If Me.CurrentRecord < Me.Recordset.RecordCount Then
Me.Recordset.MoveNext
End If
Else
strMsg = "All Fields are required."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
blnGood = False
End Sub

Private Function validate() As Boolean
validate = True
If (IsNull(Me.Vis_Inspect_Date.Value)) Then
validate = False
End If
If (IsNull(Me.QC_Line.Value)) Then
validate = False
End If
If (IsNull(Me.Black_Green_Dot.Value)) Then
validate = False
End If
If (IsNull(Me.Part_Prod_Date.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Vis_Inspected.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Vis_Bad.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Vis_Good.Value)) Then
validate = False
End If
End Function
Third group record complete:
Option Compare Database

Private blnGood As Boolean

Private Sub cboGoToRecord_AfterUpdate()
On Error Resume Next
Dim rst As Object
Set rst = Me.RecordsetClone
rst.FindFirst "AuditID = " & Me.cboGoToRecord.Value
Me.Bookmark = rst.Bookmark
End Sub

Private Sub Form_Current()
Me.cboGoToRecord.Value = Me.AuditID.Value
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String

If Not blnGood Then
Cancel = True
strMsg = "Please click the Update button to save your changes, " & vbNewLine & "or Escape to reset them."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
End Sub

Private Sub UpdateRecord_Click()
Dim strMsg As String

blnGood = True

If (validate) Then
Me.Recordset.Edit
Me.Recordset.Fields("status").Value = "Complete"
Me.Recordset.Update
If Me.CurrentRecord < Me.Recordset.RecordCount Then
Me.Recordset.MoveNext
End If
Else
strMsg = "All Fields are required."
Call MsgBox(Prompt:=strMsg, Title:="Before Update")
End If
blnGood = False
End Sub

Private Function validate() As Boolean
validate = True
If (IsNull(Me.Lab_Test_Date.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Funct_Bad.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Funct_Tested.Value)) Then
validate = False
End If
If (IsNull(Me.Total_Funct_Good.Value)) Then
validate = False
End If
End Function
 
Upvote 0

Forum statistics

Threads
1,221,808
Messages
6,162,097
Members
451,741
Latest member
shove

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top