473,505 Members | 14,136 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 1792
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,557 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,557 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
2008
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...
3
1693
by: Artur | last post by:
I need access table as a result of cross query? What should I do? Artur
4
6297
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...
2
2643
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...
4
8533
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...
4
2344
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
2032
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...
5
1681
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...
1
1601
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...
3
3555
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...
0
7216
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
7098
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
7367
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
7018
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...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5613
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,...
0
4699
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...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
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...

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.