473,657 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating a Field in a Table from a form based on a query

loonette
17 New Member
I have been searching through this forum for hours and I can't find anything that will help me.

I have a query "qclerking" that is based on a table called "tblbiddersales ", this is then popluated by entering information in a form called "frmbiddersales ". There are several fields that information is entered into, but I have a field that populates itself called "ID". It populates from the "qclerking" query. I would like a field called "ID" to then be populated in the "tblbiddersales " after information is entered in the form.

I have tried to enter the following code in the "After Update" property, but it just populates the field with a "0".

Expand|Select|Wrap|Line Numbers
  1. Private Sub Text20_AfterUpdate()
  2. Me.tblbiddersales = Me.txt20
  3. End Sub
Any help will be appreciated. If you need any other information, let me know.

Thanks!
May 5 '10 #1
4 1801
Jerry Maiapu
259 Contributor
@loonette
Hi,
I am also new to access but I think you should use recordset to insert the ID into your tblbiddersales table. Its quite confusion here because a query only display or calculates based on the data from a table..and foan ID to populate automatically is not possible..

Check to see if the ID you are talking about a column in your table..

And maybe I can help..

Regards

Jerry
May 5 '10 #2
NeoPa
32,568 Recognized Expert Moderator MVP
I'm not sure exactly what you're trying to say here, but let me guess, and you can tell me if I'm on the right lines.

You have a field [ID] in your [tblBidderSales] table.
You have a calculated field, [ID], in your [qClerking] query, which is reflected on your form [frmBidderSales].
You have a control on your form called [ID] which is bound to the calculated field in your query, but you'd like the value shown here to populate the [ID] field in your table.

Is that about the size of it?
May 5 '10 #3
loonette
17 New Member
@NeoPa

You described it exactly. Can this be done?

BTW, are you married? Cuz if you are your spouse is a very lucky person! LOL!

Thanks!
Loonette
May 5 '10 #4
NeoPa
32,568 Recognized Expert Moderator MVP
It's sweet of you to say so Loonette :) My nick is derived from my son's gaming nick of Neo (or N30 to be precise), so yes. I've been married for some while now. Those who know me well tend to think that I'm the luckier one. I won't be so modest as to say my wife drew the short straw, but I probably drew a somewhat longer one.

As for your problem, it is certainly not too straightforward to handle, but it can be done. To start with, your query would need to have the [ID] field from [tblBidderSales] included, as well as the calculated [ID] field already there. They couldn't share the same name of course.

Next, you'd need to run some code to copy the contents of the calculated ID control into the table ID control at the appropriate time.

What that time is isn't too clear to me. Do you require each record to be updated as, and only as, you browse to the particular record? If each record needs to be updated, then we may be running on entirely the wrong lines here. That would probably require an update query to be run before browsing the data.
May 5 '10 #5

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

Similar topics

0
2013
by: Jason | last post by:
I have a primary form which is used to enter/edit data in a table named Test_Results. On this primary form there is a subform which displays site addresses. This subform is linked to the primary form by field named TestID. The subform is used just for displaying site address data, data which is stored in another table named Total_Site_Address. In the Total_Site_Address table there are numerous fields that form the site addresses...
3
1701
by: Artur | last post by:
I need access table as a result of cross query? What should I do? Artur
4
6305
by: mar10 | last post by:
I have a form that I have a yes/no checkbox on it. I would like to run a query based on the answer of this checkbox. If the answer to the form checkbox is yes, I want to find yes items in the query. If the answer to the checkbox is no I want to find both yes and no items. I've tried several sinarios and have not had success. Anyone have any ideas? I'm sure this has to be simple and I'm just not thinking properly.
2
2658
by: cwhite | last post by:
I'm having problems with a form based query The user makes a selection from a drop box, there are only two choices: Current Former the user makes a choice and clicks the preview report button and it runs the query into the form and nothing appears
4
8551
by: john | last post by:
I created a form via the wizard with 1 main table and 2 one-on-one tables. As i couldn't add a field to the form (a field that I added to the table after creating the form), I googled out that the form is based on a Select Query. I managed to alter that query so that the field shows up in the field list. My question is, why exactly does access base this form on a query? What is the difference and the benefit? Thanks, john
4
2354
by: Deus402 | last post by:
Here is my table design: tblEmployers EmployerID autonum (primary key) EmployerName text tblLocations LocationID autonum (primary key) EmployerID longint (foreign key) LocationAdress text
5
2038
by: SeanCly10 | last post by:
Hi all. I don't want to sound like a complete idiot here, but I'm somewhat limited in my coding knowledge, and I need some advice and help. I'm working on a database that will eventually be used to hold patient information for research purposes. What I'm trying to do is create a form-based query system that will be easier (and less dangerous) for my future users to use to search the patient information. Let me outline the specifics,...
5
1693
by: iChappy | last post by:
I have a query based off of two fields in an Access form: Fiscal Week (user manual inputs #) & Fiscal Year (combo box defaulted to current year however may select other years) The query is a where query and the criteria is based on the values of the above listed form fields. Here is my delima: If a user types 05 into the Fiscal Week field on the form then the query runs properly; however if a 5 is typed then the query does not process...
1
1610
by: MikeMikerson | last post by:
Hello, I am need to create a subform (no problem) of a form based query (a problem). I need a form that will prompt the user to enter in a name, and the form will then display a query of the persons transactions. The ideal situation would be that the executed query would remain as part of the record because there will be many of these "searches" stored within this form. I have:
3
3563
by: davenumber40 | last post by:
I’m creating a small database in Access 2003(XP) to track issues during software testing. As far as databases go, it’s going to be a relatively small, short term project (No more than 20,000 records in the main table over about 2 months). I have a main table (Issues) that is populated by a form (IssueAdds). On my form there is a combobox to select Opened by (who created the record). That list is populated by a table called Contacts. Here...
0
8421
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
8325
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
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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
6177
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
5643
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1971
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1734
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.