Solved Enable button if file attached (1 Viewer)

theinviter

Registered User.
Local time
Today, 00:33
Joined
Aug 14, 2014
Messages
240
Dears;
I have created an evaluation form, where user can fill the form online and then print and attached the scanned signed form.
so once the user upload the form a button "send" will be enabled and then he can send the report. but if no attachment in current record so the button "Send" will be disabled.
can you please guide me how to do this.

thanks
 

theinviter

Registered User.
Local time
Today, 00:33
Joined
Aug 14, 2014
Messages
240
Dears;
I have created an evaluation form, where user can fill the form online and then print and attached the scanned signed form.
so once the user upload the form a button "send" will be enabled and then he can send the report. but if no attachment in current record so the button "Send" will be disabled.
can you please guide me how to do this.

thanks
i tried below but not working
Private Sub Form_Current()
If Me.Attachement = "" Then
Me.Command236.Enabled = False
Else
Me.Command236.Enabled = True
End If
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:33
Joined
Oct 29, 2018
Messages
21,473
Not in front of a computer now but try something like:
Code:
If Me.AttachmentField.Recordset.Recordcount > 0 Then
(untested)
 

theinviter

Registered User.
Local time
Today, 00:33
Joined
Aug 14, 2014
Messages
240
Not in front of a computer now but try something like:
Code:
If Me.AttachmentField.Recordset.Recordcount > 0 Then
(untested)
done as below thanks alot
Private Sub Form_Current()
If Me.Attachement.AttachmentCount > 0 Then
Me.Command236.Enabled = True
Else
Me.Command236.Enabled = False
End If
End Sub
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:33
Joined
Oct 29, 2018
Messages
21,473
done as below thanks alot
Private Sub Form_Current()
If Me.Attachement.AttachmentCount > 0 Then
Me.Command236.Enabled = True
Else
Me.Command236.Enabled = False
End If
End Sub
Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom