I’m trying to create a form by creating a query from two tables when the form would have all the fields except the field "lngEmpID"
But I’m unable to create either a query or a relationship from both of the tables to create the specified form.
What is that I'm doing wrong in here?
Create Form from Query
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Create Form from Query
You do not have the required permissions to view the files attached to this post.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Create Form from Query
There is no reason to use two tables here. Place all fields that you need in one table.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Create Form from Query
Thanks for the reply Hans.
Based upon your suggestion I’ve created a form to add and created logins for employees.
I have two text boxes for a user to add password where one is to create and the other is to confirm.
How could I create a message box which would say “The passwords do not match please type again†when a user mistakenly retypes a password that does not match the initial ?
Note: when the database is open it first shows a splash screen and then the login dialog. Pass for any name is 12345.
Based upon your suggestion I’ve created a form to add and created logins for employees.
I have two text boxes for a user to add password where one is to create and the other is to confirm.
How could I create a message box which would say “The passwords do not match please type again†when a user mistakenly retypes a password that does not match the initial ?
Note: when the database is open it first shows a splash screen and then the login dialog. Pass for any name is 12345.
You do not have the required permissions to view the files attached to this post.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Create Form from Query
Sorry, you mean the form to add a new employee. Create a Before Update event procedure for the form:
Code: Select all
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.strEmpPassword <> Me.Confirm_PassWord Then
Me.Confirm_PassWord.SetFocus
MsgBox "Passwords do not match!", vbExclamation
Cancel = True
End If
End Sub
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Create Form from Query
Thanks for the code. This version does not open up the splash screen automatically. I've exported the tables and forms to the database "DateQuery". Is this because of that?
You do not have the required permissions to view the files attached to this post.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Create Form from Query
How could it be done? According to me no code had been changed.
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Create Form from Query
There's no code involved.
Click the Office button in the upper left corner of the Access window.
Click "Access Options".
Select "Current Database" in the navigation pane on the left hand side.
In the "Application Options" section, "Display Form" is currently set to (none).
Select the frmStartup from the dropdown list.
Click OK.
Next time you open the database, frmStartup will automatically be displayed.
Click the Office button in the upper left corner of the Access window.
Click "Access Options".
Select "Current Database" in the navigation pane on the left hand side.
In the "Application Options" section, "Display Form" is currently set to (none).
Select the frmStartup from the dropdown list.
Click OK.
Next time you open the database, frmStartup will automatically be displayed.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands