473,770 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

drop box doesnt ad new record?

Hi,

Can someone help me to create a drop box where I can also add new records?

Here is the problem:

I m working on a form with a drop box.
When I select a '"name" in the drop box the form will change to that record.
This is ok

If I type a new "name" in the box and press enter, the record will be safed
with the new"name" and I will loose the old "name"
And what I want is that after typing a new"name" the record changes to a
blank record

The "name" is the primary key.

I also did a test with the auto ID as primary key and then I cant add a
new"name".

I have heard that its better not to make the auto ID the Primary record, but
I cant remember why :)

Greetings,
Xiphias
Nov 12 '05 #1
5 2053
"Xiphias" <Am*******@yaho o.com> wrote in message
news:40******** *************** @news.wanadoo.n l...
Hi,

Can someone help me to create a drop box where I can also add new records?

Here is the problem:

I m working on a form with a drop box.
When I select a '"name" in the drop box the form will change to that record.
This is ok

If I type a new "name" in the box and press enter, the record will be safed
with the new"name" and I will loose the old "name"
And what I want is that after typing a new"name" the record changes to a
blank record

The "name" is the primary key.

I also did a test with the auto ID as primary key and then I cant add a
new"name".

I have heard that its better not to make the auto ID the Primary record, but
I cant remember why :)


I'm a bit confused by what you're describing. There are two standard uses for a
ComboBox on a form. To enter data in the current record when the ComboBox is
bound to a field in the table or to navigate amongst the records displayed in
the form. You can't use it simultaneously to do both.

If the ComboBox is bound then it should never cause your form to "Change to a
different record". If it is set up for navigation then it should never change
the entry on the current record.

If you are using a bound ComboBox for data entry and you want to enter a new
record then you need to navigate to the new record position *before* you make an
entry in the ComboBox. Any time you are sitting on an existing record and make
an entry in a bound ComboBox you are changing the entry in the current record.
It is no different than typing over an existing value in a TextBox.

Did you use the wizard to create you ComboBox? The wizard provides choices for
either data entry or form navigation. If you choose the latter and then
manually bind the ComboBox to a field afterwards you could end up with a real
mess.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #2

Hi Rick,

Hmm... I didnt know that (I just started to program!)
But I would think there should be a way to make a new record trough a
combo box.

Something like: first check if the name typed in de box is in the list:
if not then new record.

But if its totaly not possible then I will have to work with a button to
add new record...

Thanx for taking the time to teach me something ;)
Bye,
Xiphias

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Hi,

Now I made 2 extra buttons next to the drop box (thats setup for
navigation ).
1button to edit and one to add new record. This happens in a 2nd form.
This works ok now(thanx again for your explenation).

Only when I close the 2nd form the drop box doesn't update. So I cant find
my new record.
I already tried with requery, but that makes no difference (or I'm doing
something wrong)
Most beautiful would be that the new added record would show when I close
the 2nd form.

And there is one other thing that I want to change, but I don't know how.
When I open my form the drop box is empty, but the rest of the for is
showing the first record.

Hope you have the time and patience to help me a little further.
Xiphias

Nov 12 '05 #4

"Xiphias" <Am*******@yaho o.com> wrote in message
news:40******** *************** @news.euronet.n l...
Hi,

Now I made 2 extra buttons next to the drop box (thats setup for
navigation ).
1button to edit and one to add new record. This happens in a 2nd form.
This works ok now(thanx again for your explenation).

Only when I close the 2nd form the drop box doesn't update. So I cant find
my new record.
I already tried with requery, but that makes no difference (or I'm doing
something wrong)
Most beautiful would be that the new added record would show when I close
the 2nd form.

And there is one other thing that I want to change, but I don't know how.
When I open my form the drop box is empty, but the rest of the for is
showing the first record.


In the close event of the second form...

Forms!NameOfFir stForm!NameOfCo mboBox.Requery
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 12 '05 #5
Rick,

Thank you very much!!!
"Rick Brandt" <ri*********@ho tmail.com> schreef in bericht
news:bt******** ****@ID-98015.news.uni-berlin.de...

"Xiphias" <Am*******@yaho o.com> wrote in message
news:40******** *************** @news.euronet.n l...
Hi,

Now I made 2 extra buttons next to the drop box (thats setup for
navigation ).
1button to edit and one to add new record. This happens in a 2nd form.
This works ok now(thanx again for your explenation).

Only when I close the 2nd form the drop box doesn't update. So I cant find my new record.
I already tried with requery, but that makes no difference (or I'm doing
something wrong)
Most beautiful would be that the new added record would show when I close the 2nd form.

And there is one other thing that I want to change, but I don't know how. When I open my form the drop box is empty, but the rest of the for is
showing the first record.


In the close event of the second form...

Forms!NameOfFir stForm!NameOfCo mboBox.Requery
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2493
by: Dan | last post by:
Hello all, I am getting records from a db and displaying the records to the user through a drop down menu in an asp page. Each record has 6 fields and I need to display them all to the user in the drop down. The problem is that the fields contain values of all different lengths and the columns are not aligned.
1
2550
by: Adonis Walmsley-McCarthy | last post by:
Hello all, Does anyone know how to use drag n drop techniques/command button to change the order that records will be displayed on a form? To illustrate, suppose I have 3 records a,b,c stored in that order. Is there a button I could use to promote, say record b so that it is first? Thank you in advance,
14
9116
by: deko | last post by:
Can the DROP TABLE statement be used with a select or where statement? DROP TABLE SELECT * FROM tblTablesImported WHERE Import_ID Not In (SELECT FROM tblTablesInternal); Or do I have to supply a parameter like: DROP TABLE Sheet1
2
9473
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of the choice made in the first drop-down list? If so, how can that be done? I am working with 'Teach Yourself Microsoft Access' and I didn't see it discussed in that book (if it's even possible to do). Or would I just have to create linked tables...
0
1440
by: kaon | last post by:
Hi, Ive been looking for a way to capture an autopostback event of a dropdownlist in a datagrid control. the scenario is that, ive a datagrid, and there is a dropdownlist column in each of the row with each record (note the drop down dont only show when u edit a row, but it shows always for every row), when i change a value from the dropdown for any row of the grid, i want to get the row id (or the record id that i can by someway put in...
0
1586
by: dutone | last post by:
I have searched high and low for a solution to this and I dont think its possible.... but I hope not. What I have is a list of items with various values that can be changed via a drop down. Each of the items will have a value that was previously selected by the user. When the data is displayed, the previously selected values must be set as the default in the drop down. The ids of each drop down are created acording to their index in...
2
1782
by: Krustov | last post by:
If you double click on a empty form box a drop down menu will appear . But if the form box has text content - then double clicking on the form box has no effect and a drop down menu doesnt appear . Or at least it doesnt in IE v7 . A google search only really brought up the usual beginner type of form tutorials .
1
1373
by: ninja | last post by:
Hi I am new to PHP and I have a little problem I have created a user registration form and on this form I have three drop downs one for title, prov/state and country. This creates a record in the database but when I create an edit user profile page and display the record I have a problem the record displaying correctly and I have tested the output but I cannot get the dropdowns to display the variable from the database <select...
1
1568
by: lydialysol | last post by:
I don't have any issues creating drop down menus utilizing PHP and Mysql or posting that information back to the database. My issues comes when I retrieve the records for updating purposes. The drop down menu always has the first item selected not what is in the record. For example: User B=widgets in the record. When I pull the record up User B=apple. How do I get the drop down menu to have widgets selected when I retrieve the...
0
9618
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10101
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7456
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.