Adding Items...

Apr 7, 2006

I've made a button on my form which adds a booking ID into the listbox, but it doesn't seem to work. This is my code:

Private Sub Command18_Click()
Dim BoI As String

MsgBox "Booking successfully added!", vbInformation, "Booking"

If Month(Me.Date_1) = 1 Then
ListJ.AddItem Me.BoI
ElseIf Month(Me.Date_1) = 2 Then
ListF.AddItem Me.BoI
End If
End Sub

If someone could tell me the problem, I'd appreciate it. Thank you. :)

View Replies


ADVERTISEMENT

Adding Items...

Mar 10, 2006

MsgBox "Booking successfully added!", vbInformation
'Depending on which month is booked, will determine which listbox is goes in on frmMain
If Month(Me.Date_1) = 1 Then
Forms!frmCurrentBookings!ListJ.AddItem = Me.BoI 'Add to ListJ on
frmCurrentBookings
ElseIf Month(Me.Date_1) = 2 Then
Forms!frmCurrentBookings!ListF.AddItem = Me.BoI 'Add to ListF on frmCurrentBookings
End If

End Sub

So basically... I have a date field in the form 'frmAddBooking'... if the month of the date is 1 (January), then the conntents of the date field is added to a listbox in a different form (frmCurrentBookings)... but this doesn't work...

If somebody could help me I'd appreciate it greatly.

View 2 Replies View Related

Adding Items To Combo Boxes

Sep 4, 2005

Hey Guy and Ladies,

In one database (Originally an Orders Database created by wizards)

This code to add items to a drop down list in the “orders details subform” works fine.


Private Sub ProductID_DblClick(Cancel As Integer)
On Error GoTo Err_ProductID_DblClick
Dim lngProductID As Long

If IsNull(Me![ProductID]) Then
Me![ProductID].Text = ""
Else
lngProductID = Me![ProductID]
Me![ProductID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!ProductID.Requery
If lngProductID <> 0 Then Me![ProductID] = lngProductID

Exit_ProductID_DblClick:
Exit Sub

Err_ProductID_DblClick:
MsgBox Err.Description
Resume Exit_ProductID_DblClick
End Sub

When the same code runs in my new database

Private Sub OptionID_DblClick(Cancel As Integer)
On Error GoTo Err_OptionID_DblClick
Dim lngOptionID As Long

If IsNull(Me![OptionID]) Then
Me![OptionID].Text = ""
Else
lngOptionID = Me![OptionID]
Me![OptionID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!OptionID.Requery
If lngOptionID <> 0 Then Me![OptionID] = lngOptionID

Exit_OptionID_DblClick:
Exit Sub

Err_OptionID_DblClick:
MsgBox Err.Description
Resume Exit_OptionID_DblClick
End Sub

I get the error message

“You tried to assign the Null value to a variable that is not a Variant date type”

Any suggestions?

Also if anyone knows a better way to add items to a list box “On the Fly” I would really appreciate it.

It would be nice if you could type in the value and it would automatically add it to the list for future use.

Thanks for all of your help,
Joe

View 7 Replies View Related

Adding Items To List Boxes

Oct 4, 2006

This is a somewhat complicated question to explain, so please bare with me.

I have a form with a ‘list box.’ The box is populated using a Table/Query Row Source Type method. The table I am grabbing the list from is “Department,” where it contains a list of my company’s departments(ie. Accounting, HR, Payroll, etc.).

Now, the only thing this table does not have is the word “ALL.” I need this word in the “List Box” because I want users to have the option to select ALL.

Is there anything in VBScript code wise or in Row Source that I can do to include this word?

I know I can manually go into the Department table to simply add the word, but this is not the point, because there is more to that(I have different list boxes that are grabbing lists from different tables, AND I have to refresh these tables twice a week). Please help.

Thank you.

Joe

View 1 Replies View Related

Adding Items To A Lookup Table

Dec 6, 2006

I have made a few lookup tables in the database I'm working on using the lookup wizard and entering the text I want in them. I made a form and they come over fine on them.
My question is that I thought that there was a way when you entered something other than was in that field it would automatically add it to that list and you could just select it next time instead of typing it in again. Is that possible or am I thinking of something else.

View 2 Replies View Related

Taking Multiselected Items From Listbox And Adding To Bookmark Location In Word

Feb 1, 2013

I understand how to pass text boxes to bookmarked locations in Word, but when it comes to combo boxes, list boxes, or option buttons, I am lost. So, my problem this time is the following:

I have an access user form that is asking the user to input data and make selections. Once entered I am trying to get everything to export directly to respective bookmarked locations in a Word Report. I have my text boxes working and I have the combo box now working. The issue I am experiencing is with the user making multiple selections from a list box and I am not really sure how to get that to export to the word document.

Here is what I have:

Code:
Dim strNames As String
Dim ctl As Control
Dim varItem as Variant
'ensure the user has made a selection from the testers name text box
If Me.testersNamesText.ItemsSelected.Count = 0 Then
MsgBox "You must select at least 1 Capability Testers Name"

[Code] ....

I am very new to trying to code with the Visual Basic side of things, I know this is probably the best method to do this but the issue that I am experiencing is receiving a Null error for the line with

.Selection.Text = (CStr(Forms!WebBasedIFV!testersNamesText))

And when I attempt to pass the strNames in place of the testersNamesText I receive that the user form can't find the field "strNames" referred to in my expression.

View 7 Replies View Related

General :: How To Manage Items In Set And Individual Items

Jul 31, 2013

I just want to know how to manage items in set and individual item. Suppose my product list are

individual items = A,B,C,D,E,F,G,H,I,J,K
and 5 pc set = A,B,C,D,F
and 3 pc set = G,H,K

How should I design the table. Previously I designed the table for individual items and whenever orders for set is placed user had to enter individual items with quantity.

E.g. order is for 5 pc set = 3000

A=3000
B=3000
C=3000
D=3000
F=3000

Now I need to just say 5 pc set and it should be automatically populated. And also if order have combination of individual and set items.

View 3 Replies View Related

Switchboard Items..need More Than 8

Aug 17, 2005

How can I increase the number of items on a Switchboard?

When I change the code, "conNumButtons = 8" to 20, an errors says only 8 items are allowed on a switchboard page.

When I select debug, the VB opens and the following line is highlighted yellow: "Me("Option" & intOption).Visible = False"

Do I need to change this line, or delete? to accommodate more items on a switchboard page, or am I stuck with only 8 items?

Thanks.

View 4 Replies View Related

Tables &gt; 255 Items?

Mar 6, 2006

I've been running into this problem in Access. I have records which have more than 255 fields. The easiest solution would have been to get a table with more than 255 fields, but I can't do this, so I've had to split up the tables. The next easiest solution would be if there is a way to link the tables--I have a data field "IntAccNum" identified as the primary key in each table--so that when a new row is formed in one, it is formed in the others. This wouldn't waste space, since any row in the first table would necessarily need a corresponding row in other tables. Is there a way to do this?

If not...

The problem I run into is when I populate a row in the demographic table and then try to fill a corresponding row in another table. I use a command button to for a macro to "OpenForm", and then try to "SetValue" of the appropriate field in the second table. This adds a new row in the second table. This does let me populate the correct row of the second table the first time I try for each row. However, after this initial population, when I switch back and forth between the first and second table, I get an error in access since obviously I can't keep adding a primary key with the same value in the second table.

Do I need to do some sort of query to see if that row exists in the second table already. Or is there some simple solution to what must be a very common situation that I am overlooking?

View 4 Replies View Related

Odd One - Menu Items Have Disappeared...

Jun 7, 2005

Up until recently, when I selected multiple objects in design view (on a form) and right-clicked the mouse, I had several options in the 'Size' sub-menu (including 'Size to Widest / Tallest / Narrowest / Shortest').

Then I tried to be clever(!) and create a new custom toolbar which had just these options on it, as I use them frequently. This was all very well until now, when I can't find the custom toolbar I created, and the options have disappeared from the Size submenu aswell!

Has anyone got any ideas on how I can get them back??

(I have tried going into Customize to drag them back, but they're not there either! :( )

:confused:

View 1 Replies View Related

Switchboard (Disable Items)

Jul 18, 2005

Hi Folks,

I have created a switchboard that has 8 more sub switchboards. They have got items from 1 to 8. My database is setup with users and their authorised access levels. Admin has level 1, Manager level 2, Users Level3. Now what i want is that when admin logs in all the items in the switchboard must be available, but when a Manager with leve 2 or a user with level 3 logs in to the database then certain items on a specific Switchboard must be diabled For example lets say Sub Switchboard No 3 and its item number 4 (SwitchboardID = 3 and Item Number 4) should be disabled. I tried searching it on the Forum but no use. All i request you is to help me in this issue.


Warm Regards


Darno

View 2 Replies View Related

Count Overdue Items?

Mar 29, 2006

I have a database for booking items in and out and would like the database to automatically count the number of items that are overdue.

I have a COMPLETED field which is a check box, when ticked completes the booking, if it is not ticked then the booking is incomplete.

I also have the "Date Returned" which is the date the customer is supposed to return the items.

So using these two fields how can I count the number of overdue items?

if COMPLETED=false and Date Returned<Date() +1

that's basically the logical expression I think would work, but I don't know the code/method to implement this into my database :x please help!

View 2 Replies View Related

Pasting Multiple Items.

Mar 6, 2008

I am trying to learn to use MS access 2007 and have a query about copying and pasting.

Is it possible to paste the same line of text into multiple lines or do I have to arrow down and paste into each individual box?? I can highlight any number of boxes in the same column but when I click paste it only pastes into the first highlighted box.

Any help would be really appreciated.

Thanks

View 2 Replies View Related

Form Items Missing

Mar 27, 2008

Hi,

why do ALL form items disappear if certain records are not there? my mainform is fed by a people Qry and the people have payments however, if you delete the payments, all of the items on the mainform disappear. if i go into the table and manually add a payment, everything re-appears.
the mainform is exclusive to "peopleQry" and there are 2 subforms which show different data at different times. when the form loads, these subforms have a sourceobject set to "" so it couldnt be them. the mainform doesnt display any payment information unless asked and then, it is shown on a different form. this is a bit of a problem now.

can it be prevented?

regs,

NS

View 4 Replies View Related

Multiple Items To A Claim

Dec 13, 2004

I have to redo the company I work for’s insurance program and they want it done in access. I’ve hit a big snag though. Not only are my Access skills very rusty. But also I have a very complicated task here! :)

I would need a customer table an insurer table and an adjuster table. These tables would link to a Claim table. In the claim table I need to make it show the items that the person is going to get with there insurance money by getting details from a table with all of the information for the items.

But how do I make it so you can add more then one item to the claim?

Some people may have 1 item to replace some people may have 20 items.

Hopefully someone understands what I mean here

Thanks Heaps
Ashley Colman

View 6 Replies View Related

Multiple Items In The Same Field

May 4, 2005

I am trying to enter multiple parts into the same field and using commas to separate them. Is there a way to create multiple records with the same information, but change the part numbers in them according to comma's?

Would look like this.

Primary Key Location Part number
789 bin89756 89756,87564,78965,12565,45896

I want it to do this in the end.

Primary
Key Location Part number
789 bin89756 89756
790 bin89756 87564
791 bin89756 78965
792 bin89756 12565
793 bin89756 45896

View 2 Replies View Related

Items In Stock Problem

Sep 30, 2005

I have a query which is based on a tbl which has data on chemicals in storage. The query is based on two tbls as follows;
Main tbl
ProducdID
ChemicalName


Second tbl
Batch number
TransactionID
Transaction date
Purchased check box
Used check box,
expirydate
ProducdID

When a chemical is purchased a tick goes in the Purchased check box with the other relavant data. When a chemical is used a tick goes in the Used box along with other relevant data in the other fields. In essence each chemical will have only two records 1. a purchased record and 2.eventually a Used record.

I want the query to report on all chemical records which are still in stock. So it's not as simple as adding a True or False to either check boxes. Showing records which have ticks in the Purchased CB ,or not showing records with ticks in the Used CB, will still show a Chemical which has been Purchased but may have been used at a later date and is no longer in stock.

Any suggestions? I hope I haven't confused anyone with my problem?

View 3 Replies View Related

Counting True Items

May 4, 2006

Can anyone help?
I have a table with the following:
Booked with a y/n field
Person Name with a text field
So...
Yes(True) Jim
Yes(True) Jim
No(False) Jim

What I need is to be able to show a query that shows if the checkbox is ticked (True) and the Name is Jim total up how many true items there are. So from the above I can see that Jim has 2 true items. I would then like this shown in a text box is this possible?
Also, it is not always going to be a person called Jim so... (From above)
Yes(True) Jim
Yes(True) Jim
No(False) Jim
Yes(True) Jack

So how would this go on a query in a sub form? So Name Jim would show 2 and Jack would show 1? At the moment is is grouping the name and I dont want that.
Any ideas
Cheers

View 4 Replies View Related

Count The Distinct Items

Jun 3, 2007

Hello all,
I am new to this forum. I have this problem where I need to sort the 4 books in the tables below according to the highest quantity of book sold.In this scenario,
Book C would be 1st in the table with a total quantity of 8.
How do I write a query in access to perform such operation. I have to use DISTINCT to get each book and also count the quantity(e.g. Book C:5+8).
But it seems that I can't use Count and distinct together in Access.

Title SalesNo Quantity
BookA22
BookB 31
BookC 45
BookC 53
BookD 6 1

Hope u all can help!

View 4 Replies View Related

Find Unique Items

Aug 6, 2007

Hello Access experts,

I try using query below to find the unique items in a Field but it doesnt work. Can someone help me with this query?

Thanks very much in advance.

In (SELECT [project_item] FROM [Table1] As Tmp GROUP BY [project_item] HAVING Count(*)=1 )

View 2 Replies View Related

Count Items In Order

Dec 27, 2007

I'm building an order entry database. It has two tables (amongst others) called tblOrders and tblOrderDetails, related together on the OrderID field. For every order, there is one record in tblOrder, and as many records in tblOrderDetails as there are individual lines in the order (so, if, for example, the order is for 10 pencils and 2 pens, then tblOrderDetails has 2 records).

Each entry in tblOrderDetails has a Status field, which indcates whether or not the items have are in manufacture, shipped, delivered, etc).

I need a way to get Access to show me only "Open" orders (i.e. ones in which not every item has been shipped). Can I set up a query to determine how many lines each order consists of, and then is there a way to get access to check if all of these are "Shipped"?

Many thanks in advance for any pointers,

Gary

View 1 Replies View Related

Check Off Items In Form

Jun 21, 2005

Hello,

I have a form that users type in a part number and a due date. I then run a
report that prints the part number, the components needed and the processes
needed. For example:

------User Form-------

Part 1 6/25/05
Part 2 6/28/05
Part 3 7/1/05


---------Report--------

Part 1 6/25/05

Component 1--------SAW-----WELD------SMOOTH
Component 2--------WELD-----PAINT
-------------------------------------------------------------
Part 2 6/28/05

Component 1--------DRILL-------WELD
Component 2--------SMOOTH-----PAINT
-------------------------------------------------------------
Part 3 7/1/05

Component 1--------DRILL-----PUNCH
Component 2--------CUT-------PAINT
-------------------------------------------------------------


What the users want the ability to check off (and make dissappear) the
processes each day, so they can see what processes are left.

For example, after day 1 with SAW and WELD done:

Part 1 6/25/05

Component 1--------WELD------SMOOTH
Component 2--------PAINT

I'm confused about how to go about this. I don't want the users to have to
manually type in anything. I want the components and processes to show up
when they type in the part number. I want the user to be able to check off
processes as they go, but I want all the processes to show up when they type
a new part in the form. I would appreciate it if someone would point me in
the right direction.

Thank You,

Chad

View 1 Replies View Related

Select All Items In A Listbox

Sep 21, 2005

How to code a "Select all" button to a multi select listbox named lbSeleccionePuerto

View 2 Replies View Related

Select All Items Ina Listbox

Oct 11, 2006

Does anyone know if its possible to select all items (that is turn all items black) in a listbox? thanks

View 1 Replies View Related

Form Items Placement

Nov 6, 2006

Suppose you have 10 fields on a certain spot in a form. And you want to place these ten controls, say command buttons) to line up under each other with an even spacing of about 0.2...Up to now, for a whole lot of controls, I've been selecting them one by one (or "line" by "line"), and manually entering the correct numbers in the left and top property setting fields so they line up the way I want them to. In the beginning I've tried selecting multiple controls at once and then using align but this actually never does what I want it to do.Do you guys and gals know something I don't concerning this which could make life easier?

View 2 Replies View Related

How To Use Like To Search For Items Containing Filed

Jan 6, 2005

How to use like to search for items containing filed

I have a table as such and want to have a select statement look for instances where the RequirementName has Evaluation>Child this is used as the row source for a combo box.

Table Name: Requirements
Column Name: RequirementName
Observation:
Evaluation:
Evaluation>Child
Evaluation>Child>Site
Evaluation>Child>Semester
Evaluation>Child>Supervisor
Evaluation>Child>Certification Number
Evaluation>Child>Language
Evaluation>Child>Speech Disorders
Evaluation>Child>Speech Disorders>Articulation
Evaluation>Child>Speech Disorders>Voice
Evaluation>Child>Speech Disorders>Fluency
Evaluation>Child>Speech Disorders>Dysphagia
Evaluation>Child>Related Disorders
Evaluation>Child>Audiology
Evaluation>Child>Total
Treatment:
Treatment>Child
Treatment>Child>Site
Treatment>Child>Semester
Treatment>Child>Supervisor
Treatment>Child>Certification Number
Treatment>Child>Language
Treatment>Child>Speech Disorders
Treatment>Child>Speech Disorders>Articulation
Treatment>Child>Speech Disorders>Voice
Treatment>Child>Speech Disorders>Fluency
Treatment>Child>Speech Disorders>Dysphagia
Treatment>Child>Related Disorders
Treatment>Child>Audiology
Treatment>Child>Total
Evaluation>Adult
Evaluation>Adult>Site
Evaluation>Adult>Semester
Evaluation>Adult>Supervisor
Evaluation>Adult>Certification Number
Evaluation>Adult>Language
Evaluation>Adult>Speech Disorders
Evaluation>Adult>Speech Disorders>Articulation
Evaluation>Adult>Speech Disorders>Voice
Evaluation>Adult>Speech Disorders>Fluency
Evaluation>Adult>Speech Disorders>Dysphagia
Evaluation>Adult>Related Disorders
Evaluation>Adult>Audiology
Evaluation>Adult>Total
Treatment>Adult
Treatment>Adult>Site
Treatment>Adult>Semester
Treatment>Adult>Supervisor
Treatment>Adult>Certification Number
Treatment>Adult>Language
Treatment>Adult>Speech Disorders
Treatment>Adult>Speech Disorders>Articulation
Treatment>Adult>Speech Disorders>Voice
Treatment>Adult>Speech Disorders>Fluency
Treatment>Adult>Speech Disorders>Dysphagia
Treatment>Adult>Related Disorders
Treatment>Adult>Audiology
Treatment>Adult>Total
Observation:
Evaluation:
Evaluation>Child
Evaluation>Child>Site
Evaluation>Child>Semester
Evaluation>Child>Supervisor
Evaluation>Child>Certification Number
Evaluation>Child>Language
Evaluation>Child>Speech Disorders
Evaluation>Child>Speech Disorders>Articulation
Evaluation>Child>Speech Disorders>Voice
Evaluation>Child>Speech Disorders>Fluency
Evaluation>Child>Speech Disorders>Dysphagia
Evaluation>Child>Related Disorders
Evaluation>Child>Audiology
Evaluation>Child>Total


Here is what I have so far and it does not seem to return anything.... this line is where i haveing trouble "AND RequirementName LIKE '%" & subcategory1.value & "%' "
Private Sub Subcategory1_AfterUpdate()

Dim sRequirementName As String

sRequirementName = "SELECT Requirements.RequirementName " & _
"FROM Requirements " & _
"WHERE Requirements.Area = '" & Me.AArea1.value & "' " & _
"AND Requirements.Level = '" & Me.level1.value & "' " & _
"AND RequirementName LIKE '%" & subcategory1.value & "%' "

Me.RequirementName1.RowSource = sRequirementName
Me.RequirementName1.Requery

End Sub

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved