Conditionally hiding form fields in Access - ms-access-2013

I'm building a database for work to book in computer repairs. I'm trying to make an 'Open Jobs' continuous form. The form will contain fields - JobID, EntryDate, Forename, Surname and JobStatus.
The Forename and Surname will be joined - =[Forename] & ' ' & [Surname]
JobStatus refers to a lookup field in my JobStatusT table. Each status has a JobStatusID ranging from 1-4.
What I am trying to achieve is, when JobStatus = 4 or Collected all fields for that record should not be visible.

Related

Update a cell in Excel Sheet using Power Automate

I'm trying to update the "Email Sent" column once an email has sent. Once an email has been sent I want it to say "Sent" instead of "No"
I'm using the "update a row" action however, can't seem to have it updated. I'm not sure what I should enter for the "Key Value" because email can be sent for multiple rows at once. This is what I have so far but it is not working:
My Excel table:
When you use "Update a row", you need to specify a key column (the one with a unique id or value) so Power Automate can search a single row and update it.
Field "Key Column" is the column name where said ID is stored.
Field "Key Value" is the value to search for.
For example, in the following table:
Mentor ID
Email
Email_Sent
A001
someone#gmail.com
No
A002
someoneelse#gmail.com
No
If you wanted to update the first row, you'd need to specify Key Column = Mentor ID, and Key Value = A001.

Cannot display correct records in unbound form in Access 2013

I have one Table called tblEmployees - ID, First, Last. One unbound form called frmSearch with a textbox named Searchbox and a search button that searches by ID.I have one more unbound form called frmDisplay that displays the search result in it which I would like to edit when necessary. The textbox fields for this form are EID, Fname, Lname.
The problem I am having is when I enter the ID# in the searchbox and click the search button (where I linked both ID fields in the button wizard) it keeps on displaying the second record in my table. This is the code I currently have running
Private Sub Form_Load()
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("SELECT * from tblEmployees WHERE ID=ID")
EID.Value = rst!ID
Fname.Value = rst!First
Lname.Value = rst!Last
end sub
When I change the code to read
("SELECT * tblEmployees WHERE ID=" & ID")
I get a syntax error missing operator in query expression ID="
ID must have some value. Then concatenate ID:
"Select * From tblEmployees Where ID = " & ID & ""
The recordset that's currently being opened will include all the records in your table, because for every record the condition ID = ID will always be true. It's purely coincidence that it's displaying the second record from your table. You didn't specify a sort on the recordset query so it could randomly pick up any record as the first one in the results. What you actually need is
Set rst = CurrentDb.OpenRecordset("SELECT * from tblEmployees WHERE ID = " & frmSearch!Searchbox)

Counting a field value response weekly basis in Lotus Notes

I have radio button field in a form whose value can be 1 or 2 or 3. I have a made a view out of this form and there one column will contain the value of this radio button field . Whenever a customer submits the form, a new document will appear in the view. A customer can submit the form many times with different value of this radio button. Is it possible to know how many times a particular customer selected the value 1?
Yes, you can create a view where the first column is your customer name and the second column is their response. Both columns should be "categorized" meaning they'll group the like values.
For each column you can set the formula to include the number of documents within the group. For example:
CustomerName + " (" + #DocChildren + ")"
will show you "ABC Company (12)" if ABC had 12 responses.

FileMaker obtain a related record with matching parameter

I have two related tables "Objects" and "Measurements"; Objects::ID=Measurements::fk_objectID. For each "object ID" there are multiple "measurements"; measurements have different "date" and "measurement site". I am trying to display in a layout from "Objects" measurements that fit certain pattern and/or on certain date (for instance on the object release date). I am trying to use ExecuteSQL:
ExecuteSQL(
"SELECT Size
FROM Measurements
JOIN Objects on Measurements.fk_objectID=Objects.ID
WHERE Measurements.fk_Tissue_ID=2 "
; "" ; "")
This command returns "Size" values for all Objects IDs, not a single ID which is currently viewed in the layout. It looks like the records are not filtered based on the relationship. making it
ExecuteSQL(
"SELECT Size
FROM Measurements
JOIN Objects on Measurements.fk_objectID=Objects.ID
WHERE Measurements.fk_Tissue_ID=2 AND Measurements.Date=Objects.ReleaseDate"
; "" ; "")
returns mistake.

How to get sets of Records in VB6?

Hey guys, just want to ask you a simple question that I know you're familiar with... I am using VB6, I just want to get sets of records from my database. What I mean is that I have UserID and with a part of code provided below, it only gets a single set of record. Like for instance, the value of UserID is A12, and so, all sets of records with the UserID of A12 must display in Textboxes respectively with the aid of datPayroll.Recordset.MoveNext.
With datPayroll
.RecordSource = "select * from tblpayroll where empid like '" & UserID & "'"
.Refresh
Me.txtRegularHours.Text = .Recordset.Fields!reghours
End With
-datPayroll : DataControl
-txtRegularHours : Textbox
-UserID : Variable
You probably want to look at MoveFirst, MoveNext, etc. and also EOF
Here is a link or two to get you started:
EOF, BOF
MoveFirst, MoveNext
You need to check that you have some data in your Recordset using EOF, then MoveFirst to move to the first record, and loop through using MoveNext.

Resources