473,473 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Input Issue In Forms

35 New Member
Hello,

Ok i have a very annoying problem here and as im new to access it is driving me insane.

Ok what i have is a form which i can enter a new user, which works fine however, if the user already exists in the table to which the form is linked to then i cant bring up that record, due to the form is designed for new users. How can i combine it so i can either enter a new user or do a lookup for an existing user in the same label?

This is a pic of the relationships i have, i think if this was altered it may work better but i am a newby so this is my best attempt.

Nov 10 '06 #1
3 1465
NeoPa
32,556 Recognized Expert Moderator MVP
I can only outline as that's as far as my experience with forms takes me.
You need to build a recordset which is a DynaSet.
The form built on this recordset should give you the ability to edit OR insert records.
Test the recordset first. If it shows as having an empty record at the end - it should be an updatable DynaSet.
Nov 10 '06 #2
j0rdanf1
35 New Member
I can only outline as that's as far as my experience with forms takes me.
You need to build a recordset which is a DynaSet.
The form built on this recordset should give you the ability to edit OR insert records.
Test the recordset first. If it shows as having an empty record at the end - it should be an updatable DynaSet.
Never heard of that before, how would i go about doing that?
Nov 10 '06 #3
MSeda
159 Recognized Expert New Member
You can toggle from Data Entry to Search and Edit by adding a combo box and two comand buttons.

use the wizard to create the combo box and tell the wizard you want it to find a specific record on your form.
once the combo is created set its visible property to no

create two command buttons without the wizard make one's caption read search for existing client and the other's read Add New (or what ever captions you like)
Set the visible property for the add new to no

Choose the on click property of the Add New cmd and enter this code
(you will need to change the names to match the objects on your form)

Private Sub CmdNew_Click()

Me.ClientText.Visible = True
Me.CmdSearch.Visible = True
DoCmd.GoToControl "ClientText"
Me.ClientCombo.Visible = False
Me.CmdNew.Visible = False
Me.Form.DataEntry = True

End Sub

Then go to the on click property for the Search Existing button and enter this code:

Private Sub CmdSearch_Click()

Me.ClientCombo.Visible = True
Me.CmdNew.Visible = True
DoCmd.GoToControl "ClientCombo"
Me.ClientText.Visible = False
Me.CmdSearch.Visible = False

Me.Form.DataEntry = False

End Sub

once you test the code to see that it works stack the combo box on top of the text box and the command buttons on top of each other. and make them the same size

the search combos visible property is set to no as is the add new button
so when you open the form it will open in data entry mode with the text box visible to enter a new client and a button that reads "search for existing client" when that button is clicked the textbox will go invisible and the combo will become visible and the search button will go invisible and the add button will become visible. also the forms data entry property is changed to no. the add button returns every thing to the original settings

I don't seem to be able to add a picture so I can e-mail you a screen shot if you like.
[IMG]C:\Documents and Settings\Meg\My Documents\Form2.bmp[/IMG]
Nov 10 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Susan Cranford | last post by:
Please forgive, I have looked at so much info I can't figure out how to put it together even though I know it must be fairly simple. I have an array of input text boxes (txtDOBn) where n is...
10
by: crjunk | last post by:
I have a script that I want to run only when my input box IS NOT disabled. Can someone tell me if something is wrong with my script? Is "disabled" the correct property to use? function...
7
by: cjl | last post by:
I have the following HTML/CSS: HTML: <div id="stealth_form"> <form name="stealthme" action="" onSubmit="return initializeSearch(this);"> <input type='password' name='query' size=16> </form>...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
2
by: headware | last post by:
I realize that when making a web application, performing input validation in the browser is good because it prevents postbacks. However, input checking that goes beyond making sure a value exists...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
11
by: TJM | last post by:
Hi, A Javascript error is generated when the user types a few character in an INPUT TYPE=FILE and hits a submit button. The form does not post. Is there a solution to this problem? Thanks TJM
2
by: charles-brewster | last post by:
I'm trying to write a simple JavaScript function which will use a button to copy table cell data into a form input text box as the "value" attribute. The following is intended to test the...
6
by: Mike | last post by:
I have a form that contains 240 "products". Each Product has a TR. Each TR contains a Yes and No radio button and a Product-Qty text input. A situation exists where I have to go through all the...
44
by: Kulgan | last post by:
Hi I am struggling to find definitive information on how IE 5.5, 6 and 7 handle character input (I am happy with the display of text). I have two main questions: 1. Does IE automaticall...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.