Prompt User for a field (1 Viewer)

kitty77

Registered User.
Local time
Today, 11:56
Joined
May 27, 2019
Messages
712
If IsNull([sampleid2]) Then [field1] = [sampleid1] & ".RPT" Else [field1] = [sampleid1] & ".RPT" or [sampleid2] & ".RPT"

I have a command button that checks for the this. How can I have "the Else" prompt the user to select either [sampleid1] or [sampleid2]
 

kitty77

Registered User.
Local time
Today, 11:56
Joined
May 27, 2019
Messages
712
Dim MyAnswer As String
MyAnswer = InputBox("Enter Sample ID")
Me.field1.Value = MyAnswer & ".RPT"

This works. But instead of the user having to input the value, is it possible to have them choose the value from [field3] or [field4]?
 

kitty77

Registered User.
Local time
Today, 11:56
Joined
May 27, 2019
Messages
712
I think I got it... How can I change it to 1 or 2, instead of Yes or No?

Select Case MsgBox("Sample ID", vbYesNo, "testing")

Case Is = vbYes
[Field1] = [sampleid] & ".RPT"

Case Is = vbNo
[Field1] = [sampleid1] & ".RPT"

End Select
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:56
Joined
Oct 29, 2018
Messages
21,473
How can I change it to 1 or 2, instead of Yes or No?
You can use a Popup form instead of a message box. Or, you can look for a customized message box like this one.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:56
Joined
May 21, 2018
Messages
8,529
Build your own form with a combobox holding the SampleIDs.
 

kitty77

Registered User.
Local time
Today, 11:56
Joined
May 27, 2019
Messages
712
You can use a Popup form instead of a message box. Or, you can look for a customized message box like this one.
Thanks
 

Users who are viewing this thread

Top Bottom