Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | Outlook Express signatures

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > General IT Discussion
Register FAQ Community Calendar

Need some help with Access please
Reply
 
Thread Tools
Old 05-04-2005, 14:08   #1
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Need some help with Access please

Ok,

I have an access table:

tblItemDetails

And I need to add some records to it programmatically.

The table has the following fields:

strItemNumber
strItemDescription

I have a form (frmEnterNumbers) with two text boxes on it:

txtStartNumber
txtEndNumber

What I want to do is this:

Click a button on the form.
Access opens the table and adds a new record where strItemNumber is equal to txtStartNumber.
Access moves from this record to the next new record and adds a record where strItemNumber is equal to txtStartNumber + 1.

The other field strDescription will be left blank and will be filled in by the user as and when they need to.
The idea being that I will end up with new records in the table ranging from txtStartNumber to txtEndNumber.
Raistlin is offline   Reply With Quote
Advertisement
Old 05-04-2005, 14:47   #2
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: Need some help with Access please

's ok, got it sorted now.

Racked my brains for a bit until I remembered how I had done it 18 months ago when I had a similar project.

Cheers anyway
Raistlin is offline   Reply With Quote
Old 05-04-2005, 15:45   #3
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: Need some help with Access please

Ok, new problem.

Have two text boxes:

txtNumberOne
txtNumberTwo

When txtNumberTwo loses focus I want some VBA script to check that the number in txtNumberTwo is greater than the number in txtNumberOne.

If it isn't I would like some sort of warning to pop up, then when the user clicks on OK the focus should return to txtNumberTwo and the number in that field should be deleted.

Please could somebody help me with this, I know it should be simple but my brain's well and truely addled today
Raistlin is offline   Reply With Quote
Old 05-04-2005, 16:05   #4
Nemesis
Inactive
 
Join Date: Jun 2003
Location: Surrey
Age: 59
Services: Virgin stuff
Posts: 6,407
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Nemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny starNemesis has a nice shiny star
Send a message via MSN to Nemesis
Re: Need some help with Access please

Quote:
Private Sub txtNumbertwo_LostFocus()
Dim value1, value2
value1 = txtNumberone.Value
value2 = txtNumbertwo.Value
If value2 > value1 Then
MsgBox "Value 2 larger than Value1", vbOKOnly, "ERROR"
txtNumbertwo.Value = 0
txtNumbertwo.SetFocus
End If

End Sub
Nemesis is offline   Reply With Quote
Old 05-04-2005, 16:11   #5
Raistlin
Inactive
 
Join Date: Feb 2004
Location: There's no place like 127.0.0.1
Services: Depends on the person and the price they're offering
Posts: 12,384
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Raistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered starsRaistlin is seeing silvered stars
Re: Need some help with Access please

Thanks Nem
Raistlin is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:16.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum