473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

updating two fields from a combo box?!

1
i know i should not be asking..... but i am!
ok, i am trying to make a simple database (real Simple) it will store publications, just the volume and issue numbers and also their print cycle (ie. monthly, weekly.....) all i am trying to do is make a form that when an individual opens the form to enter a publication all they need to do is select the publication from a combobox and its print cycle is automgicaly updated. i am very NEW, like still shiny and squeeky new. i tried this code but it did not work... i think i am getting stuck in the making of the tables?!!

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo0_Change()
  2. With Me(Publication)
  3. If IsNull(Me!Publication) Then
  4.     .RowSource = ""
  5.     Else
  6.         .RowSource = "SELECT [PrintCycle] " & _
  7.                      "FROM TblPrintCycle " & _
  8.                      "WHERE [PrintCycle]=" & Me!Publication
  9.     End If
  10.     Call .Requery
  11. End With
  12.  
  13. End Sub
Mar 28 '07 #1
1 1241
MMcCarthy
14,534 Expert Mod 8TB
If PrintCycle is a text field the following should work.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo0_Change()
  2. With Me(Publication)
  3. If IsNull(Me!Publication) Then
  4.     .RowSource = ""
  5.     Else
  6.         .RowSource = "SELECT [PrintCycle] " & _
  7.                      "FROM TblPrintCycle " & _
  8.                      "WHERE [PrintCycle]='" & Me!Publication & "'"
  9.     End If
  10.     Call .Requery
  11. End With
  12.  
  13. End Sub
Mary
Mar 28 '07 #2

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

Similar topics

3
by: Bobbak | last post by:
Hello All, I was wondering if it is at all possible to have a single combo box update multiple fields in a single record. For example I have created an Employee Info form, and in that form there's...
6
by: Prakash Wadhwani | last post by:
In a small Contacts Database, I have 6 Boolean(Yes/No) Fields so that 6 individuals in the company can maintain their own private mailing list. The names of the fields are as follows: Commander...
6
by: cyoung311 | last post by:
I'm trying to do an automatic update of one table from another through a form. Basically, when a selection is made for an item, in this case a particular workshop, I want to get the associated...
5
by: J. Yuan | last post by:
Hi, I am working on a checkout/inventory system. How can I make a button that when pressed, would update the previous fields transaction number to a table (for example, -3 printers, so that...
9
by: cybervegan | last post by:
Hi, First, the background info: I have a parent form, New_Jobcard that contains a combo-box to select Cust_ID. The combobox shows customers sorted by name and address, like this: Cust_ID V ...
9
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
1
by: Eric IsWhoIAm | last post by:
I have three tables: Courses (Key is Autonumber Course Number, also have Text Course Name); Instructors (similar fields); and Courses and Instructors (have a combination of the four fields). ...
4
by: Light1 | last post by:
I am working in Access 2003. I have a form that pulls information from a couple of tables. When the user chooses a selection from the dropdown menu of a combo box, it is putting that information...
2
by: =?Utf-8?B?VmFuZXNzYQ==?= | last post by:
Hi All! I am with a situation where I am not getting the right updating to the form's fields. The situation is the following one: I have one combobox and one textbox. I am using the...
2
by: yeske03 | last post by:
I'm currently using Access 2003 to create a simple form. I am using two tables of information to go into this form. One table I named "Categories" with fields of "CategoryID" and "CategoryName"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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
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,...

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.